]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Restore lost shutdown reason
authorJohn Ferlan <jferlan@redhat.com>
Tue, 16 Oct 2018 12:38:27 +0000 (08:38 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 7 Nov 2018 12:41:41 +0000 (07:41 -0500)
commit296e05b54b958a5b806456cdd535bb2c1b969a6b
tree59113974fb0d951e2d9a324d14c5c336f75e1b2b
parent8496c17c5343714344636a023747d72eebae75e6
qemu: Restore lost shutdown reason

When qemuProcessReconnectHelper was introduced (commit d38897a5d)
reconnection failure used VIR_DOMAIN_SHUTOFF_FAILED; however, that
was changed in commit bda2f17d to either VIR_DOMAIN_SHUTOFF_CRASHED
or VIR_DOMAIN_SHUTOFF_UNKNOWN.

When QEMU_CAPS_NO_SHUTDOWN checking was removed in commit fe35b1ad6
the conditional state was just left at VIR_DOMAIN_SHUTOFF_CRASHED.

So introduce qemuDomainIsUsingNoShutdown which will manage the
condition when the domain was started with -no-shutdown so that
when/if reconnection failure occurs we can restore the decision
point used to determine whether CRASHED or UNKNOWN is provided.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_process.c