[pve-devel] [PATCH container] Decide whether volume is added as unused in subclass
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Mar 7 12:39:28 CET 2016
follow the change in PVE::AbstractConfig
---
Note: depends on the patch series for pve-common.
src/PVE/LXC/Config.pm | 3 ++-
src/test/snapshot-expected/delete/lxc/105.conf | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index ff8f7b3..ef0673c 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -121,10 +121,11 @@ sub __snapshot_delete_vmstate_file {
}
sub __snapshot_delete_vol_snapshot {
- my ($class, $vmid, $ms, $mountpoint, $snapname) = @_;
+ my ($class, $vmid, $ms, $mountpoint, $snapname, $unused) = @_;
my $storecfg = PVE::Storage::config();
PVE::Storage::volume_snapshot_delete($storecfg, $mountpoint->{volume}, $snapname);
+ push @$unused, $mountpoint->{volume};
}
sub __snapshot_rollback_vol_possible {
diff --git a/src/test/snapshot-expected/delete/lxc/105.conf b/src/test/snapshot-expected/delete/lxc/105.conf
index b5a2837..c6d04c9 100644
--- a/src/test/snapshot-expected/delete/lxc/105.conf
+++ b/src/test/snapshot-expected/delete/lxc/105.conf
@@ -7,4 +7,3 @@ net0: bridge=vmbr0,hwaddr=12:34:56:78:90:12,ip=dhcp,ip6=dhcp,name=eth0,type=veth
ostype: redhat
rootfs: local:snapshotable-disk-1
swap: 512
-unused0: local:unsnapshotable-disk-1
--
2.1.4
More information about the pve-devel
mailing list