]> git.proxmox.com Git - qemu-server.git/commitdiff
qm nbdstop: cope graceful with errors
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Apr 2020 14:19:41 +0000 (16:19 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Apr 2020 14:22:33 +0000 (16:22 +0200)
as the nbd server could have been stopped by something else.
Further, it makes no sense to die and mark the migration thus as
failed, just because of a NBD server stop issue.

At this point the migration hand off to the target was done already,
so normally we're good, if it fails we have other (followup) problems
anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/CLI/qm.pm

index f99d4015c49d564de3f69e43b46005663d005049..282fa862c77585e133d2ce3f818b1d294ba11ba0 100755 (executable)
@@ -274,7 +274,8 @@ __PACKAGE__->register_method ({
 
        my $vmid = $param->{vmid};
 
 
        my $vmid = $param->{vmid};
 
-       PVE::QemuServer::nbd_stop($vmid);
+       eval { PVE::QemuServer::nbd_stop($vmid) };
+       warn $@ if $@;
 
        return undef;
     }});
 
        return undef;
     }});