rbd : volume_snapshot : parse volname

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2013-02-05 12:55:39 +01:00
committed by Dietmar Maurer
parent 478fc06cd5
commit 9af33ed0b9

View File

@ -437,7 +437,9 @@ sub volume_snapshot {
return 1 if $running;
my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'create', '--snap', $snap, $volname);
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'create', '--snap', $snap, $name);
run_command($cmd, errmsg => "rbd snapshot $volname' error", errfunc => sub {});
return undef;
}