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 889635 - 'virsh shutdown' is broken if guest-agent isn't responsive
Summary: 'virsh shutdown' is broken if guest-agent isn't responsive
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-22 02:17 UTC by Eric Blake
Modified: 2013-11-21 08:36 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.10.2-19.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 08:36:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1581 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2013-11-21 01:11:35 UTC

Description Eric Blake 2012-12-22 02:17:57 UTC
Description of problem:
Use of 'virsh shutdown --mode=agent' obviously requires both host and guest setup (a <channel> in the XML on the host side, and qemu-guest-agent installed and running in the guest).  But 'virsh shutdown' with no explicit --mode argument is a request to use driver-preferred shutdown technology.  In my case, I was running a guest where the host had the <channel> set up, but the guest was not running the agent; when I did 'virsh shutdown' with no mode argument, libvirt tried to do an agent shutdown, but that failed; and there was no fallback to acpi shutdown.  As a result, I was only able to shutdown the guest with an explicit 'virsh shutdown --mode=acpi'.  But this could be termed a regression over RHEL 6.0, where there was no --mode argument, and acpi shutdown was the default.

Version-Release number of selected component (if applicable):
libvirt-0.10.2-13.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. set up a guest with an agent <channel> in the XML, but with the guest agent not installed and running in the guest
2. in the host, issue unadorned 'virsh shutdown $guest'
3.
  
Actual results:
# virsh shutdown fedora-local
error: Failed to shutdown domain fedora-local
error: Guest agent is not responding: Guest agent not available for now


Expected results:
If the agent isn't responsive to a simple echo test, and --mode wasn't specified, then the qemu driver should fall back to an acpi shutdown instead of giving up immediately.

Additional info:

Comment 1 Michal Privoznik 2013-02-25 17:56:10 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-February/msg01406.html

Comment 2 Michal Privoznik 2013-02-27 08:27:46 UTC
Patch has been accepted upstream:

https://www.redhat.com/archives/libvir-list/2013-February/msg01450.html

However, the upsream is currently short before release so it's being discussed upstream it the patch is well understood and thus safe to push now or whether it should be postponed until after the release.

Comment 3 Michal Privoznik 2013-03-01 08:10:45 UTC
Moving to POST:

commit b8e25c35d7f80a2fadc0e51e95318e39db3d1687
Author:     Michal Privoznik <mprivozn>
AuthorDate: Mon Feb 25 18:52:12 2013 +0100
Commit:     Michal Privoznik <mprivozn>
CommitDate: Thu Feb 28 12:24:34 2013 +0100

    qemu: Don't fail to shutdown domains with unresponsive agent
    
    Currently, qemuDomainShutdownFlags() chooses the agent method of
    shutdown whenever the agent is configured. However, this
    assumption is not enough as the guest agent may be unresponsive
    at the moment. So unless guest agent method has been explicitly
    requested, we should fall back to the ACPI method.


v1.0.3-rc2-11-gb8e25c3

Comment 12 tingting zheng 2013-07-10 05:40:18 UTC
I can reproduce this bug with:
libvirt-0.10.2-13.el6.x86_64

Steps:
1. set up a guest with an agent <channel> in the XML, but with the guest agent not installed and running in the guest

2. in the host, execute command:
# virsh shutdown demo
error: Failed to shutdown domain demo
error: Guest agent is not responding: Guest agent not available for now

Tested with:
libvirt-0.10.2-19.el6.x86_64

# virsh shutdown demo
Domain demo is being shutdown

Refer to the above comments,move the bug to VERIFIED.

Comment 14 errata-xmlrpc 2013-11-21 08:36:08 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/RHBA-2013-1581.html


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