[pve-devel] [PATCH] update sheepdog storage module to 0.8

Alexandre Derumier aderumier at odiso.com
Mon Jan 27 03:57:22 CET 2014


- 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 at odiso.com>
---
 PVE/Storage/SheepdogPlugin.pm |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index eb42cf4..3bef2a8 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -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");
 
 }
-- 
1.7.10.4




More information about the pve-devel mailing list