]> git.proxmox.com Git - pve-storage.git/commitdiff
update sheepdog storage module to 0.8
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 27 Jan 2014 02:57:22 +0000 (03:57 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 28 Jan 2014 06:06:13 +0000 (07:06 +0100)
- collie command is now 'dog'
- KB size is now k
- snapshot rollback need force -f flag, to avoid confirm prompt

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/SheepdogPlugin.pm

index eb42cf495da7da4834d292fa29a23c982ccefd5e..3bef2a8f16c0667747a5cd0d9983b5044e58f462 100644 (file)
@@ -14,7 +14,7 @@ my $collie_cmd = sub {
 
     my $portal = $scfg->{portal};
     my ($server, $port) = split(':', $portal);
-    my $cmd = ['/usr/sbin/collie', $class, $op, '-a', $server];
+    my $cmd = ['/usr/sbin/dog', $class, $op, '-a', $server];
     push @$cmd, '-p', $port if $port;
 
     push @$cmd, @options if scalar(@options);
@@ -244,7 +244,7 @@ sub alloc_image {
 
     $name = &$find_free_diskname($storeid, $scfg, $vmid);
 
-    my $cmd = &$collie_cmd($scfg, 'vdi', 'create', $name , "${size}KB");
+    my $cmd = &$collie_cmd($scfg, 'vdi', 'create', $name , "${size}k");
 
     run_command($cmd, errmsg => "sheepdog create $name' error");
 
@@ -408,7 +408,7 @@ sub volume_snapshot_rollback {
     my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
         $class->parse_volname($volname);
 
-    my $cmd = &$collie_cmd($scfg, 'vdi', 'rollback', '-s', $snap, $name);
+    my $cmd = &$collie_cmd($scfg, 'vdi', 'rollback', '-f', '-s', $snap, $name);
     run_command($cmd, errmsg => "sheepdog snapshot $name' error");
 
 }