[pve-devel] [PATCH 01/44] storage : vdisk_free : eval parse_volname

Alexandre DERUMIER aderumier at odiso.com
Thu Feb 14 09:08:42 CET 2013


On my nexenta san for example,

I have other volumes with custom names  (whatyourwant....), for others usage than proxmox. (shared san disk on physical databases)

And when I try to delete a proxmox nexenta volume, It's dying when parsing the volume.



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

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre Derumier" <aderumier at odiso.com>, pve-devel at pve.proxmox.com 
Envoyé: Jeudi 14 Février 2013 08:34:16 
Objet: RE: [pve-devel] [PATCH 01/44] storage : vdisk_free : eval parse_volname 

> Subject: [pve-devel] [PATCH 01/44] storage : vdisk_free : eval parse_volname 
> 
> If the storage have some customs volumes name, vdisk_free will hang 

Please can you provide an example volumne name which triggers the bug? 


> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com> 
> --- 
> PVE/Storage.pm | 10 +++++++--- 
> 1 file changed, 7 insertions(+), 3 deletions(-) 
> 
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 50bd0c5..c2f83a0 
> 100755 
> --- a/PVE/Storage.pm 
> +++ b/PVE/Storage.pm 
> @@ -528,11 +528,15 @@ sub vdisk_free { 
> my $vollist = $plugin->list_images($storeid, $scfg); 
> foreach my $info (@$vollist) { 
> my (undef, $tmpvolname) = parse_volume_id($info->{volid}); 
> + my $basename = undef; 
> + my $basevmid = undef; 
> 
> - my (undef, undef, undef, $basename, $basevmid) = 
> - $plugin->parse_volname($tmpvolname); 
> + eval{ 
> + (undef, undef, undef, $basename, $basevmid) = 
> + $plugin->parse_volname($tmpvolname); 
> + }; 
> 
> - if ($basename && $basevmid == $vmid && $basename eq 
> $name) { 
> + if ($basename && $basevmid && $basevmid == $vmid && 
> $basename eq 
> +$name) { 
> die "base volume '$volname' is still in use " . 
> "(use by '$tmpvolname')\n"; 
> } 
> -- 
> 1.7.10.4 
> 
> _______________________________________________ 
> pve-devel mailing list 
> pve-devel at pve.proxmox.com 
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list