Red Hat Bugzilla – Bug 771016
virsh destroy a guest . guest status will hang with in shutdown
Last modified: 2013-10-20 17:44:16 EDT
Description of problem: virsh destroy a guest . guest status will hang with in shutdown restart libvirtd will work around this libvirt-0.9.4-23.el6_2.1.x86_64 is fine so it is regression . Version-Release number of selected component (if applicable): libvirt-0.9.4-23.el6_2.2.x86_64 qemu-kvm-0.12.1.2-2.209.el6_2.2.x86_64 How reproducible: 100% Steps to Reproduce: 1. #virsh start q2 Domain q2 started 2. #virsh destroy q2 Domain q2 destroyed 3.#virsh list --all - q2 in shutdown Actual results: hang Expected results: no hang ,status should be shut off Additional info:
This was a side effect of the patch for https://bugzilla.redhat.com/show_bug.cgi?id=770959 which was included in libvirt-0.9.4-23.el6_2.2 . The problem was reported and fixed upstream. libvirt-0.9.4-23.el6_2.3 is built and should include the fix: commit 97652044af5f2c70e2bfbddbd59eb047bf0a82fa Author: Jiri Denemark <jdenemar@redhat.com> Date: Wed Dec 7 12:52:59 2011 +0100 qemu: Ignore shutdown event from destroyed domain During virDomainDestroy, QEMU may emit SHUTDOWN event as a response to SIGTERM and since domain object is still locked, the event is processed after the domain is destroyed. We need to ignore this event in such case to avoid changing domain state from shutoff to shutdown. Daniel
Reproduced the bug with: libvirt-0.9.4-23.el6_2.2.x86_64 qemu-kvm-0.12.1.2-2.209.el6_2.2.x86_64 # virsh start rhel6 Domain rhel6 started # virsh list Id Name State ---------------------------------- 1 rhel6 running # virsh destroy rhel6 Domain rhel6 destroyed # virsh list --all Id Name State ---------------------------------- - rhel6 in shutdown When I updated libvirt to libvirt-0.9.4-23.el6_2.3.x86_64,it is fine: # virsh start rhel6 Domain rhel6 started # virsh list Id Name State ---------------------------------- 1 rhel6 running # virsh destroy rhel6 Domain rhel6 destroyed # virsh list --all Id Name State ---------------------------------- - rhel6 shut off
Verified this issue with: libvirt-0.9.4-23.el6_2.4.x86_64 libvirt-client-0.9.4-23.el6_2.4.x86_64 libvirt-python-0.9.4-23.el6_2.4.x86_64 # virsh start test Domain test started # virsh list --all Id Name State ---------------------------------- 2 test running # virsh destroy test Domain test destroyed # virsh list --all Id Name State ---------------------------------- - test shut off So change the status to VERIFIED.
Verified PASS with libvirt-0.9.10-1.el6. pkg: qemu-kvm-0.12.1.2-2.225.el6 kernel-2.6.32-232.el6 # virsh start rhel6 Domain test started # virsh list --all Id Name State ---------------------------------- 7 rhel6 running # virsh destroy test Domain test destroyed # virsh list --all Id Name State ---------------------------------- - rhel6 shut off
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. http://rhn.redhat.com/errata/RHSA-2012-0748.html