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 845635 - Return a specific error when qemu-ga is missing or unusable during a live snapshot (quiesce)
Summary: Return a specific error when qemu-ga is missing or unusable during a live sna...
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-08-03 16:39 UTC by Federico Simoncelli
Modified: 2013-02-21 07:21 UTC (History)
11 users (show)

Fixed In Version: libvirt-0.10.0-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: When communicating to a guest agent, many possibilities may happen. Firstly, guest agent may come and go anytime and it is not considered a bug. Hence, libvirt is trying to ping the agent before issuing 'real' state-changing command. If libvirt won't get any answer within 30 seconds on the ping, the state-changing command is not issued, so libvirt won't loose track of the guest state. Moreover, an error is thrown. But with previous code, an unspecified error with meaningless error code was returned. Consequence: Management application couldn't distinguish what is going on: if a guest agent is not configured, or if it is unusable, or something. Fix: A new VIR_ERR_AGENT_UNRESPONSIVE error code was introduced, and error messages were fixed. Result: Management application can see why guest agent call fails.
Clone Of:
Environment:
Last Closed: 2013-02-21 07:21:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


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 Federico Simoncelli 2012-08-03 16:39:59 UTC
Description of problem:
When a live snapshot request is issued using the flag VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE if the guest-agent is not reachable (or any of its tasks failed to complete) libvirt returns a generic error: VIR_ERR_INTERNAL_ERROR or VIR_ERR_ARGUMENT_UNSUPPORTED.

I suggest to return one (or more) guest-agent specific errors so that the controlling application can decide whether to retry without the VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag or not.

Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6_3.3.x86_64

Comment 2 Huang Wenlong 2012-08-06 03:17:11 UTC
I can reproduce this bug with libvirt-0.9.10-21.el6_3.3.x86_64


# virsh snapshot-create-as ga g1 --disk-only --quiesce
error: argument unsupported: QEMU guest agent is not configured

[root@intel-q9400-4-2 3.3]# rpm -q libvirt
libvirt-0.9.10-21.el6_3.3.x86_64


libvirtd.log 
2012-08-06 03:09:08.753+0000: 8015: error : qemuDomainSnapshotFSFreeze:9654 : argument unsupported: QEMU guest agent is not configured

Comment 3 Michal Privoznik 2012-08-23 15:05:55 UTC
Federico,

what is actual use case for this? It's true that current implementation requires qemu guest agent to be configured for VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag. If there is no qemu agent the flag can't be supported as we don't have any other implementation for transiting disks into quiesce state. Hence, the flag is unsupported and it's right to throw VIR_ERR_ARGUMENT_UNSUPPORTED error. Moreover, in the description to _QUIESCE flag is written that guest agent is used.
Then again, if mgmt application call an API with flag X set an gets VIR_ERR_ARGUMENT_UNSUPPORTED it can retry without flag X. Okay, I admit that such error is not very useful as it doesn't say (on error code level) which argument is unsupported, but that is contained in error message string. And I doubt any library have separate _UNSUPPORTED error codes for different arguments.

I might be not understanding something here, though.

Comment 4 Eric Blake 2012-08-23 15:18:29 UTC
I think (but correct me if I'm wrong, Federico) that the biggest complaint is that if you have a guest where you know you set up the agent, but the agent still fails (for example, if you happened to time your quiesce request at a moment while the guest is still booting and therefore the agent is not running in the guest yet), then the current error message is VIR_ERR_INTERNAL_ERROR.  But it is not an internal error, rather a case of the guest agent not being responsive.  Perhaps the VIR_ERR_ARGUMENT_UNSUPPORTED when there is no guest agent is okay, because management is less likely to try to use the flag if it hasn't already prepped guests to have an agent.

Comment 5 Michal Privoznik 2012-08-27 11:59:53 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2012-August/msg01735.html

Federico, is this what you were expecting?

Comment 6 Federico Simoncelli 2012-08-27 13:04:42 UTC
(In reply to comment #5)
> Patch proposed upstream:
> 
> https://www.redhat.com/archives/libvir-list/2012-August/msg01735.html
> 
> Federico, is this what you were expecting?

Yes that looks great. Thanks!

Comment 7 Michal Privoznik 2012-08-27 16:11:52 UTC
Moving to POST:

commit 3e0cc6306aa7db2d3e55193aff21684c70b67ec6
Author:     Michal Privoznik <mprivozn>
AuthorDate: Mon Aug 27 13:49:21 2012 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Mon Aug 27 18:00:10 2012 +0200

    qemu_agent: Switch to virReportSystemError() on system error
    
    Currently, if a syscall in qemu_agent.c fails we report an internal
    error even though we should be reporting a system error.

commit aa3e8bd4ca38f72f917d364448be3a87ee294627
Author:     Michal Privoznik <mprivozn>
AuthorDate: Mon Aug 27 12:24:59 2012 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Mon Aug 27 18:00:10 2012 +0200

    Introduce new VIR_ERR_AGENT_UNRESPONSIVE error code
    
    Currently, when guest agent is configured but not responsive
    (e.g. due to appropriate service not running in the guest)
    we return VIR_ERR_INTERNAL_ERROR. Both are wrong. Therefore
    we need to introduce new error code to reflect this case.

v0.10.0-rc1-37-g3e0cc63

Comment 9 Huang Wenlong 2012-08-30 04:24:29 UTC
Bug 852668 block to verify this bug , I will verify it once 852668 is fixed

Comment 10 Huang Wenlong 2012-09-21 07:43:16 UTC
Verify this bug : 
libvirt-0.10.2-0rc1.el6.x86_64


1) when qemu-ga is working 

# virsh snapshot-create-as q64 g1 --disk-only --quiesce
Domain snapshot g1 created



2) when qemu-ga is missing 
# virsh snapshot-create-as q64 g2 --disk-only --quiesce 
error: Guest agent is not responding: Guest agent not available for now

libvirtd.log
2012-09-21 07:40:19.000+0000: 10200: error : qemuAgentSend:888 : Guest agent is not responding: Guest agent not available for now
2012-09-21 07:40:24.000+0000: 10200: error : qemuAgentSend:888 : Guest agent is not responding: Guest agent not available for now

Comment 11 errata-xmlrpc 2013-02-21 07:21:01 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.