RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 853821 - virsh reboot with 'agent' shutdown mode will hang
Summary: virsh reboot with 'agent' shutdown mode will hang
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-03 03:53 UTC by Alex Jia
Modified: 2018-12-02 16:23 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.10.2-0rc1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:22:56 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Alex Jia 2012-09-03 03:53:21 UTC
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 05:31:48 UTC
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 12:02:12 UTC
*** Bug 853839 has been marked as a duplicate of this bug. ***

Comment 5 Jiri Denemark 2012-09-04 12:21:36 UTC
This is now fixed upstream by v0.10.1-15-g03c42a4:

commit 03c42a4510f3232cb85c673f7f02208d56169eca
Author: Jiri Denemark <jdenemar>
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 07:29:23 UTC
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 07:22:56 UTC
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.