volume_snapshot_delete: deactivate before deleting
This commit is contained in:
committed by
Dietmar Maurer
parent
9b256d4676
commit
399581a2b3
@ -709,6 +709,8 @@ sub volume_snapshot_delete {
|
||||
|
||||
my $path = $class->filesystem_path($scfg, $volname);
|
||||
|
||||
$class->deactivate_volume($storeid, $scfg, $volname, $snap, {});
|
||||
|
||||
my $cmd = ['/usr/bin/qemu-img', 'snapshot','-d', $snap, $path];
|
||||
|
||||
run_command($cmd);
|
||||
|
||||
@ -569,6 +569,8 @@ sub volume_snapshot_delete {
|
||||
|
||||
return 1 if $running;
|
||||
|
||||
$class->deactivate_volume($storeid, $scfg, $volname, $snap, {});
|
||||
|
||||
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
|
||||
|
||||
my (undef, undef, undef, $protected) = rbd_volume_info($scfg, $storeid, $name, $snap);
|
||||
|
||||
@ -416,6 +416,8 @@ sub volume_snapshot_delete {
|
||||
|
||||
return 1 if $running;
|
||||
|
||||
$class->deactivate_volume($storeid, $scfg, $volname, $snap, {});
|
||||
|
||||
my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
|
||||
$class->parse_volname($volname);
|
||||
|
||||
|
||||
@ -462,6 +462,7 @@ sub volume_snapshot {
|
||||
sub volume_snapshot_delete {
|
||||
my ($class, $scfg, $storeid, $volname, $snap, $running) = @_;
|
||||
|
||||
$class->deactivate_volume($storeid, $scfg, $volname, $snap, {});
|
||||
$class->zfs_request($scfg, undef, 'destroy', "$scfg->{pool}/$volname\@$snap");
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@ libpve-storage-perl (4.0-24) unstable; urgency=medium
|
||||
|
||||
* drbd: return correct used/avail/total sizes
|
||||
|
||||
* volume_snapshot_delete: deactivate before deleting
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 25 Sep 2015 13:36:22 +0200
|
||||
|
||||
libpve-storage-perl (4.0-23) unstable; urgency=medium
|
||||
|
||||
Reference in New Issue
Block a user