Dan Kenigsberg has submitted this change and it was merged.
Change subject: virt: Try to detect non guest iniated shutdowns
......................................................................
virt: Try to detect non guest iniated shutdowns
When a host system shutsdown due to a variety of reasons (UPS, fencing...)
VMs running on that system get stopped before VDSM and libvirtd services
are stopped. This is due to the way how they are registerd with machined.
This results in the qemu processes being signaled with SIG_TERM and them
exiting. To libvirt this looks the same as if the shutdown would have been
initiated from within the VM and therefore emits a lifecycle event that
looks to VDSM as if the VM was stopped from within. VDSM in this case
reports the exit reason as user shutdown. This is a problem for HA VMs
which will not be automatically rescheduled when they see a user shutdown
exit reason.
This patch attempts to detect non user shutdowns. This requires the VM to
have the ovirt guest agent running to detect these scenarios properly.
Backport-To: 4.0
Bug-Url:
https://bugzilla.redhat.com/1341106
Change-Id: Ie04b9806fbf0a81dc576aa28cfdda5edb079ce29
Signed-off-by: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Reviewed-on:
https://gerrit.ovirt.org/64991
Reviewed-by: Milan Zamazal <mzamazal(a)redhat.com>
Continuous-Integration: Jenkins CI
Reviewed-by: Francesco Romani <fromani(a)redhat.com>
---
M lib/vdsm/virt/guestagent.py
M lib/vdsm/virt/vmexitreason.py
M vdsm/virt/vm.py
3 files changed, 41 insertions(+), 10 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Vinzenz Feenstra: Verified
Francesco Romani: Looks good to me, approved
Milan Zamazal: Looks good to me, but someone else must approve
--
To view, visit
https://gerrit.ovirt.org/64991
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie04b9806fbf0a81dc576aa28cfdda5edb079ce29
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>