[pve-devel] [PATCH] vzdump : fix check if volid exist for "virtual" storage : rbd, sheepdog, nexenta

Alexandre DERUMIER aderumier at odiso.com
Mon Feb 18 07:45:20 CET 2013


oh yes, indeed ;)


----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Lundi 18 Février 2013 07:31:39 
Objet: RE: [pve-devel] [PATCH] vzdump : fix check if volid exist for "virtual" storage : rbd, sheepdog, nexenta 

no, wait. 

I have use your old patch! The new one you sent is OK. 

> -----Original Message----- 
> From: Alexandre DERUMIER [mailto:aderumier at odiso.com] 
> Sent: Montag, 18. Februar 2013 07:31 
> To: Dietmar Maurer 
> Cc: pve-devel at pve.proxmox.com 
> Subject: Re: [pve-devel] [PATCH] vzdump : fix check if volid exist for "virtual" 
> storage : rbd, sheepdog, nexenta 
> 
> oh, you are right, I'll make the patch 
> 
> 
> ----- Mail original ----- 
> 
> De: "Dietmar Maurer" <dietmar at proxmox.com> 
> À: "Alexandre Derumier" <aderumier at odiso.com>, pve- 
> devel at pve.proxmox.com 
> Envoyé: Lundi 18 Février 2013 06:40:32 
> Objet: RE: [pve-devel] [PATCH] vzdump : fix check if volid exist for "virtual" 
> storage : rbd, sheepdog, nexenta 
> 
> > - die "no such volume '$volid'\n" if ! -e $path; 
> > + if (! -e $path){ 
> > + my $dl = PVE::Storage::vdisk_list($self->{storecfg}, $storeid, 
> > + undef); my $foundvolid = undef; 
> > + 
> > + PVE::Storage::foreach_volid($dl, sub { my ($volumeid) = @_; 
> > + if($volumeid eq $volid) { $foundvolid = 1; return; } }); die "no 
> > + such volume '$volid'\n" if !$foundvolid; } 
> > 
> > my ($size, $format) = PVE::Storage::Plugin::file_size_info($path); 
> 
> But this does not raise an exception if the volume does not exists? Maybe we 
> want: 
> 
> die "no such volume '$volid'\n" if !$size; 



More information about the pve-devel mailing list