]> git.proxmox.com Git - pve-container.git/commitdiff
migrate: cleanup final_cleanup
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 17 Oct 2017 11:25:23 +0000 (13:25 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 17 Oct 2017 11:29:27 +0000 (13:29 +0200)
use remove_lock instead of manually removing

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/LXC/Migrate.pm

index 9e8027cb7bd93922bf9001cf232eb25117e658a5..95addab48820a0cf4808c7dfa440e6c419a53860 100644 (file)
@@ -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);
        }