Bug 749096 - Libvirt doesn't detect crashed domains correctly after restarted libvirtd
Summary: Libvirt doesn't detect crashed domains correctly after restarted libvirtd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-26 07:18 UTC by yuping zhang
Modified: 2014-06-18 00:39 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.10.2-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:36:04 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description yuping zhang 2011-10-26 07:18:27 UTC
Description of problem:
Stop libvirtd,then kill the guest,after that,start libvirtd and run virsh domstate --reason,it cannot detect crashed domains correctly

Version-Release number of selected component (if applicable):
libvirt-0.9.4-19.el6.x86_64
qemu-kvm-0.12.1.2-2.200.el6.x86_64
kernel-2.6.32-211.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.#virsh start rhel6-test

2.#service libvirtd stop
Stopping libvirtd daemon:                                  [  OK  ]

3.# nc -U /var/lib/libvirt/qemu/rhel6-test.monitor
{"QMP": {"version": {"qemu": {"micro": 1, "minor": 12, "major": 0}, "package":
"(qemu-kvm-0.12.1.2)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"q"}
{"return": {}}
{"timestamp": {"seconds": 1319591214, "microseconds": 534506}, "event":
"SHUTDOWN"}

Or kill the guest with #kill -9 $VM_PID

4.# service  libvirtd start
Starting libvirtd daemon:                                  [  OK  ]

5.# virsh domstate rhel6-test --reason
shut off (failed)

Actual results:
shut off (failed)

Expected results:
shut off (crashed)
 
Additional info:
More info,please refer to bug 617890.

Comment 1 Jiri Denemark 2011-11-03 13:08:39 UTC
It seems we should rather report it as "crashed" instead of "failed" when we
cannot connect to qemu monitor but with qemu version for which we don't use
-no-shutdown, we fail to connect to monitor also after the guest correctly shut
down when libvirtd was stopped.

Comment 2 Martin Kletzander 2012-06-07 06:51:08 UTC
Moving to POST:

commit bda2f17d7e673f4dd7fc1a03389ca7d8f4e1646e
Author: Martin Kletzander <mkletzan>
Date:   Wed Jun 6 16:43:41 2012 +0200

    qemu: better detection of crashed domains

Comment 3 zhpeng 2012-12-12 08:05:06 UTC
Steps same as comment0
pkgs: libvirt-1.0.0-1.el7

It's verified.

Comment 5 Ludek Smid 2014-06-13 11:36:04 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.