[pve-devel] [PATCH pve-container] check if backup mode is defined to avoid warnings
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Oct 2 17:50:34 CEST 2015
on an backup abort (like when trying to make a stop mode backup of
a HA service) task->{mode} may be undefined, this causes an ugly
error output so let's check for it.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
src/PVE/VZDump/LXC.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index a7fafe9..68fe724 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -317,7 +317,7 @@ sub cleanup {
my $conf = PVE::LXC::load_config($vmid);
- if ($task->{mode} ne 'suspend') {
+ if ($task->{mode} && $task->{mode} ne 'suspend') {
my $rootdir = $default_mount_point;
my $disks = $task->{disks};
foreach my $disk (reverse @$disks) {
--
2.1.4
More information about the pve-devel
mailing list