[pve-devel] [PATCH qemu-server] migrate: also cleanup bitmaps if 'qm start' failed

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Mar 26 11:31:03 CET 2020


since $self->{storage_migration} is not (yet) set at that point, but
bitmaps have been created.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 PVE/QemuMigrate.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index ef5f6fd..023c50e 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -1012,10 +1012,11 @@ sub phase2_cleanup {
 	if (my $err = $@) {
 	    $self->log('err', $err);
 	}
-	eval { $self->cleanup_bitmaps() };
-	if (my $err =$@) {
-	    $self->log('err', $err);
-	}
+    }
+
+    eval { $self->cleanup_bitmaps() };
+    if (my $err =$@) {
+	$self->log('err', $err);
     }
 
     my $nodename = PVE::INotify::nodename();
-- 
2.20.1





More information about the pve-devel mailing list