This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 853821 - virsh reboot with 'agent' shutdown mode will hang
virsh reboot with 'agent' shutdown mode will hang
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
high Severity medium
: rc
: ---
Assigned To: Jiri Denemark
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-02 23:53 EDT by Alex Jia
Modified: 2013-07-16 08:27 EDT (History)
7 users (show)

See Also:
Fixed In Version: libvirt-0.10.2-0rc1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:22:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
libvirtd.log (13.44 KB, text/plain)
2012-09-02 23:53 EDT, Alex Jia
no flags Details

  None (edit)
Description Alex Jia 2012-09-02 23:53:21 EDT
Created attachment 609241 [details]
libvirtd.log

Description of problem:
virsh reboot with 'agent' shutdown mode will hang, in fact, the guest is successfully rebooted, but virsh command can't exit.

Version-Release number of selected component (if applicable):

On the host:
# rpm -q libvirt qemu-kvm-rhev seabios kernel
libvirt-0.10.1-1.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.307.el6.x86_64
seabios-0.6.1.2-19.el6.x86_64
kernel-2.6.32-288.el6.x86_64

On the guest:
# rpm -q qemu-guest-agent
qemu-guest-agent-0.12.1.2-2.307.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. to configure guest support GA
2. virsh start <domain>
3. login the guest then install qemu-guest-agent and start qemu-ga service
4. virsh reboot --mode agent <domain>
  
Actual results:

The guest is successfully rebooted, but virsh reboot command can't exit.


Expected results:

virsh reboot command can normally exit after executing.

Additional info:

I can see {"execute":"guest-shutdown","arguments":{"mode":"reboot"}} in qemu-ga's log on the guest.

# virsh dumpxml myRHEL6
<domain type='kvm' id='2'>
  ......
  <devices>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/myRHEL6.agent'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
  ......
  </devices>
  ......
</domain>
Comment 2 Alex Jia 2012-09-03 01:31:48 EDT
virsh reboot with 'agent' mode is successfull on libvirt-0.9.10-9.el6 and qemu-kvm-0.12.1.2-2.265.el6, and with qemu-guest-agent-0.12.1.2-2.265.el6 in the guest, please see https://bugzilla.redhat.com/show_bug.cgi?id=767333#c12, so it should be a regression bug.
Comment 4 Jiri Denemark 2012-09-03 08:02:12 EDT
*** Bug 853839 has been marked as a duplicate of this bug. ***
Comment 5 Jiri Denemark 2012-09-04 08:21:36 EDT
This is now fixed upstream by v0.10.1-15-g03c42a4:

commit 03c42a4510f3232cb85c673f7f02208d56169eca
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Tue Sep 4 12:01:43 2012 +0200

    qemu: Fix reboot with guest agent

    When reboot using qemu guest agent was requested, qemu driver kept
    waiting for SHUTDOWN event from qemu. However, such event is never
    emitted during guest reboot and qemu driver would keep waiting
    forever.
Comment 7 Wayne Sun 2012-09-19 03:29:23 EDT
pkgs:
# rpm -q libvirt qemu-kvm-rhev kernel seabios
libvirt-0.10.2-0rc1.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.313.el6.x86_64
kernel-2.6.32-279.el6.x86_64
seabios-0.6.1.2-19.el6.x86_64

In guest:
# rpm -q qemu-guest-agent
qemu-guest-agent-0.12.1.2-2.314.el6.x86_64

steps
1. prepare a domain with qemu ga support
# virsh dumpxml libvirt_test_api
...
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/myRHEL6.agent'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
...

# virsh start libvirt_test_api

login guest and install qemu-guest-agent

2. reboot with agent mode
# virsh reboot --mode agent libvirt_test_api
Domain libvirt_test_api is being rebooted

Reboot success and virsh exited.

So, this is fixed.
Comment 8 errata-xmlrpc 2013-02-21 02:22:56 EST
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-2013-0276.html

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