Bug 1418927
Summary: | The lifecycle event for Guest OS Shutdown is not distinguishable from a qemu process that was quit with SIG_TERM | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Martin Kletzander <mkletzan> |
Component: | qemu-kvm-rhev | Assignee: | Eric Blake <eblake> |
Status: | CLOSED ERRATA | QA Contact: | Chao Yang <chayang> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | chayang, dyuan, eblake, fromani, juzhang, knoel, lmiksik, michal.skrivanek, michen, mrezanin, rbalakri, vfeenstr, virt-maint, xuzhang, yafu, yanqzhan |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-rhev-2.9.0-9.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1384007 | Environment: | |
Last Closed: | 2017-08-01 23:44:45 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1384007 |
Description
Martin Kletzander
2017-02-03 07:47:03 UTC
On the qemu side, the QMP command 'system_powerdown' (invoked by 'virsh shutdown' if the guest agent is not present) sets the global powerdown_requested, which in turn triggers a call to qemu_system_powerdown(), and that sends the first qemu_event_send_powerdown() event seen by libvirt as POWERDOWN prior to iterating through any registered powerdown_notifiers; one of those notifiers then results in the ACPI signal seen by the guest; the guest (normally) reacts by shutting down and eventually triggers the next round of events sent by qemu when qemu_system_shutdown_request() is reached. Or, if the guest agent is active, system_powerdown is skipped, but it is still a guest action that triggers qemu_system_shutdown_request(). Either way, the global shutdown_requested is set to 1, although shutdown_signal is left unchanged. Meanwhile, the SIGTERM handler termsig_handler() calls qemu_system_killed(), which sets the global shutdown_requested but also shutdown_signal, and in turn lets main_loop_should_exit() send qemu_event_send_shutdown() seen as a SHUTDOWN event by libvirt. Ultimately, since the global shutdown_requested is used through both code paths, the only thing that qemu could do differently is to enhance the SHUTDOWN event that it emits to report the presence of a shutdown signal, based on whether the global shutdown_signal was set at the time the event is emitted. Such a change is a new feature, though, so it would NOT make qemu 2.9. I will propose it upstream, and it could be backported to RHEV if upstream agrees to it, but then libvirt still has to have a patch to be taught to make use of that bit of information. Upstream proposal: https://lists.gnu.org/archive/html/qemu-devel/2017-04/msg01098.html Missed qemu 2.9; but simple enough to still be backported if upstream approves the idea v9 will probably be upstream soon: https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg03742.html Backport is here: https://post-office.corp.redhat.com/archives/rhvirt-patches/2017-June/msg00018.html Fix included in qemu-kvm-rhev-2.9.0-9.el7 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 |