improve free_image with deactivate_volumes

this is necessary to prevent an error when trying to remove a mapped volume.
This commit is contained in:
Wolfgang Link
2015-09-08 12:23:53 +02:00
committed by Dietmar Maurer
parent 1cff783277
commit 515ef80bf5

View File

@ -407,6 +407,8 @@ sub free_image {
}
}
$class->deactivate_volume($storeid, $scfg, $volname);
my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'purge', $name);
run_rbd_command($cmd, errmsg => "rbd snap purge '$volname' error");