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 1024245 - vcpucount don't check exclusive options.
Summary: vcpucount don't check exclusive options.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 7.0
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-29 08:25 UTC by Hao Liu
Modified: 2014-06-18 00:57 UTC (History)
8 users (show)

Fixed In Version: libvirt-1.1.1-13.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:43:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Hao Liu 2013-10-29 08:25:00 UTC
Description of problem:
vcpucount don't check exclusive options.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 7.0 Beta
libvirt-1.1.1-10.el7.x86_64

How reproducible:
always

Command:
# virsh vcpucount <vm-name> --config --live --current

Result:
2

Expected result:
error: --config, --live, and --current are mutually exclusive.

Comment 2 Peter Krempa 2013-10-30 13:16:28 UTC
The --live and --config flags should be considered mutually exclusive for this virsh command. However the combination of --current with those flags is legal as --current was used in a different meaning before the introduction of the modern meaning thus the meaning of the flags is dual and filtered.

I'll post a patch to forbid --live and --config here.

Comment 3 Peter Krempa 2013-11-11 09:52:49 UTC
Now fixed upstream:

commit bf45db6041c207e78e6a3185ceaf278b09e21561
Author: Peter Krempa <pkrempa>
Date:   Wed Oct 30 13:58:09 2013 +0100

    virsh-domain: Mark --live and --config mutually exclusive in vcpucount
    
    The 'vcpucount' command is a getter command for the vCPUu count. When
    one or more of the filtering flags are specified the command returns the
    value only for the selected combination. In this case the --live and
    --config combination isn't valid. This however didn't cause errors as
    the combination of flags was rejected by the libvirt API but then the
    fallback code kicked in and requested the count in a way where the clash
    of the flags didn't matter.
    
    Mark the flag combination mutually exclusive so that users aren't
    confused.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1024245

Comment 6 chentao 2013-11-26 02:34:09 UTC
Verify this bug with libvirt-1.1.1-13.el7.x86_64,the following was the verify steps.

steps:
1.Start a guest and check the vcpu.
# virsh dumpxml rhel1 | grep vcpu -A 3
  <vcpu placement='static'>2</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>

#virsh vcpucount rhel1 --live --current
2
#virsh vcpucount rhel1 --config --current
2

2.Edited the guest's xml and set the vcpu to 4,then check the vcpu
#virsh vcpucount rhel1 --live --current
2
#virsh vcpucount rhel1 --config --current
4

For libvirt-1.1.1-10.el7.x86_64:
#virsh vcpu rhel1 --config --live --current
2

#virsh vcpu rhel1 --config --live
2

For libvirt-1.1.1-13.el7.x86_64:
#virsh vcpu rhel1 --config --live --current
error: Options --live and --config are mutually exclusive

# virsh vcpucount rhel1 --config --live
error: Options --live and --config are mutually exclusive

Do the upper steps and I can get the error message,so mark this bug verifed.

Comment 7 Ludek Smid 2014-06-13 09:43:41 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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