The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6729
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From b19d206ba6a986093aff8ae22caab9dc9b50ce2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Sat, 18 Jan 2020 21:03:36 +0200 Subject: [PATCH] lxd/vm: Don't crash on vm-initiated reboots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/instance/drivers/vm_qemu.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lxd/instance/drivers/vm_qemu.go b/lxd/instance/drivers/vm_qemu.go index e283e2fe78..43a71c6fdc 100644 --- a/lxd/instance/drivers/vm_qemu.go +++ b/lxd/instance/drivers/vm_qemu.go @@ -476,11 +476,15 @@ func (vm *qemu) OnStop(target string) error { return err } - // Done after this. - defer op.Done(nil) - if target == "reboot" { - return vm.Start(false) + err := vm.Start(false) + if err != nil { + return err + } + } + + if op != nil { + op.Done(nil) } return nil
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel