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 1143837 - libvirt should improve error message output when use domstats with option --domain and --list-*
Summary: libvirt should improve error message output when use domstats with option --d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-18 06:10 UTC by Luyao Huang
Modified: 2015-11-19 05:52 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.16-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:52:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Luyao Huang 2014-09-18 06:10:58 UTC
description of problem:
libvirt should improve error message output when use domstats with option --domain and --list-*

Version-Release number of selected component (if applicable):
libvirt-1.2.8-2.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.# virsh domstats  --list-active
Domain: 'r6'
  state.state=1
  state.reason=1

Domain: 'test3'
  state.state=1
  state.reason=1

2.# virsh domstats  --domain r6
Domain: 'r6'
  state.state=1
  state.reason=1


3.# virsh domstats  --list-active --domain r6
error: unsupported flags (0x1) in function qemuConnectGetAllDomainStats

4.

Actual results:
output message is not clear enough and libvirt should add a check for mutually exclusive between options

Expected results:
# virsh domstats  --list-active --domain r6
error: Options --domain and --list-active are mutually exclusive

Additional info:

Comment 1 Luyao Huang 2015-02-13 10:01:37 UTC
This is an old patch i have write:

https://www.redhat.com/archives/libvir-list/2014-November/msg00069.html

Comment 2 Pavel Hrdina 2015-03-31 13:38:55 UTC
Proposed upstream patch:

https://www.redhat.com/archives/libvir-list/2015-March/msg01587.html

To: Luyao

I didn't replied to your mail because it's quite old.  Your fix isn't good as the options are available only for virsh and there is no _DOMAIN flag equivalent to --domain option.  I've sent a patch with different approach to fix this bug.

Comment 3 Luyao Huang 2015-04-01 01:22:32 UTC
(In reply to Pavel Hrdina from comment #2)
> Proposed upstream patch:
> 
> https://www.redhat.com/archives/libvir-list/2015-March/msg01587.html
> 
> To: Luyao
> 
> I didn't replied to your mail because it's quite old.  Your fix isn't good
> as the options are available only for virsh and there is no _DOMAIN flag
> equivalent to --domain option.  I've sent a patch with different approach to
> fix this bug.

Hi Pavel,

No problem. It is a quite old mail and I think your patch are right. If I can go back to post, i would write a better one :-P

Comment 4 Pavel Hrdina 2015-05-04 10:45:36 UTC
Proposed another upstream patch:

https://www.redhat.com/archives/libvir-list/2015-May/msg00018.html

Comment 5 Pavel Hrdina 2015-05-13 15:40:33 UTC
This bug is now fixed by upstream commit:

commit 85d8ede9eb1da870e553f43dea215606ec47d190
Author: Peter Krempa <pkrempa>
Date:   Wed Apr 29 16:41:20 2015 +0200

    qemu: Convert qemuConnectGetAllDomainStats to use new helpers
    
    Use the new domain list collection helpers to avoid going through
    virDomainPtrs.
    
    This additionally implements filter capability when called through the
    api that accepts domain list filters.

v1.2.15-51-g85d8ede


Now there will be no error message, because filtering list of domains is now supported.

Comment 7 Fangge Jin 2015-07-29 07:28:09 UTC
I can reproduce this bug on build libvirt-1.2.8-2.el7.x86_64.

Verify this bug on build libvirt-1.2.17-2.el7.x86_64.

Verify steps:

1.# virsh domstats --list-active
Domain: 'r71-2'
  state.state=1
  state.reason=1
  cpu.time=32803184141
  cpu.user=3950000000
......

Domain: 'rhel7-5'
  state.state=1
  state.reason=1
  cpu.time=314099234182
  cpu.user=2780000000
......

2.# virsh domstats --list-active --domain r71-2
Domain: 'r71-2'
  state.state=1
  state.reason=1
  cpu.time=42220250694
  cpu.user=5270000000
......

List successfully in step2. So move to verified.

Comment 9 errata-xmlrpc 2015-11-19 05:52:58 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.

https://rhn.redhat.com/errata/RHBA-2015-2202.html


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