Hide Forgot
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:
This is an old patch i have write: https://www.redhat.com/archives/libvir-list/2014-November/msg00069.html
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.
(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
Proposed another upstream patch: https://www.redhat.com/archives/libvir-list/2015-May/msg00018.html
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.
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.
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