[pve-devel] [PATCH 12/16] rbd : volume_snapshot_rollback : parse_volname
Alexandre Derumier
aderumier at odiso.com
Sun Feb 3 09:49:39 CET 2013
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Storage/RBDPlugin.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index a6c4762..298faed 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -454,7 +454,9 @@ sub volume_snapshot {
sub volume_snapshot_rollback {
my ($class, $scfg, $storeid, $volname, $snap) = @_;
- my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'rollback', '--snap', $snap, $volname);
+ my ($vtype, $name, $vmid) = $class->parse_volname($volname);
+
+ my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'rollback', '--snap', $snap, $name);
run_command($cmd, errmsg => "rbd snapshot $volname to $snap' error", errfunc => sub {});
}
--
1.7.10.4
More information about the pve-devel
mailing list