]> git.proxmox.com Git - qemu-server.git/commitdiff
better cleanup logging for migration
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 28 Nov 2018 09:40:45 +0000 (10:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Nov 2018 10:04:46 +0000 (11:04 +0100)
if we migrate a vm we call cleanup but the logging looks like:

Starting cleanup for 101
trying to acquire lock...
 OK
Configuration file 'nodes/pve-ceph-01/qemu-server/101.conf' does not exist

with this patch, we omit any logging in the case we do not have the config,
since we cannot know what to clean up

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/CLI/qm.pm

index eceb9b3861dc7d0c99ff0c9ca37689a0535935fe..26d4217d07e77fc49399502135f8310a83ba5155 100755 (executable)
@@ -753,6 +753,9 @@ __PACKAGE__->register_method({
        my $clean = $param->{'clean-shutdown'};
        my $guest = $param->{'guest-requested'};
 
+       # return if we do not have the config anymore
+       return if !-f PVE::QemuConfig->config_file($vmid);
+
        my $storecfg = PVE::Storage::config();
        warn "Starting cleanup for $vmid\n";