]> git.proxmox.com Git - pve-storage.git/commitdiff
sheepdog: fix find_next_volume with storeid != 'sheepdog', find display volume size
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 21 Jun 2013 12:40:52 +0000 (14:40 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 24 Jun 2013 08:07:33 +0000 (10:07 +0200)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/SheepdogPlugin.pm

index 12621867739046e9ae1a8fbaec1f87c62f10b7e8..ab25f98bac079fdb16860753412a2e042ff4e43a 100644 (file)
@@ -62,7 +62,7 @@ sub sheepdog_ls {
        if ($line =~ /(=|c) ((vm|base)-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s(\d+)\s(\S+)\s(\d+)/) {
            my $image = $2;
            my $owner = $4;
-           my $size = $5;
+           my $size = $6;
            my $idvdi = $10;
            my $parentid = $relationship->{$idvdi}->{parent} if $relationship->{$idvdi}->{parent};
            my $parent = $relationship->{$parentid}->{name} if $parentid;
@@ -149,7 +149,7 @@ my $find_free_diskname = sub {
     my ($storeid, $scfg, $vmid) = @_;
 
     my $sheepdog = sheepdog_ls($scfg, $storeid);
-    my $dat = $sheepdog->{sheepdog};
+    my $dat = $sheepdog->{$storeid};
     my $disk_ids = {};
 
     foreach my $image (keys %$dat) {