[pve-devel] [PATCH v3 container 2/3] migrate: cleanup final_cleanup

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Oct 17 13:25:23 CEST 2017


use remove_lock instead of manually removing

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

diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
index 9e8027c..95addab 100644
--- a/src/PVE/LXC/Migrate.pm
+++ b/src/PVE/LXC/Migrate.pm
@@ -350,10 +350,7 @@ sub final_cleanup {
     $self->log('info', "start final cleanup");
 
     if (!$self->{conf_migrated}) {
-	my $conf = $self->{vmconf};
-	delete $conf->{lock};
-
-	eval { PVE::LXC::Config->write_config($vmid, $conf); };
+	eval { PVE::LXC::Config->remove_lock($vmid, 'migrate'); };
 	if (my $err = $@) {
 	    $self->log('err', $err);
 	}
-- 
2.14.2





More information about the pve-devel mailing list