Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1293241

Summary: libvirt should forbid set 0,^0 in cpuset instead of generate a xml which have broken settings
Product: Red Hat Enterprise Linux 7 Reporter: Luyao Huang <lhuang>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: dyuan, mzhan, pkrempa, rbalakri
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.3.2-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 18:49:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luyao Huang 2015-12-21 08:03:38 UTC
Description of problem:
libvirt should forbid set 0,^0 in cpuset instead of generate a xml which have broken settings

Version-Release number of selected component (if applicable):
libvirt-1.2.17-13.el7_2.2.x86_64

How reproducible:
100%

Steps to Reproduce:
1.prepare a inactive guest:

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     RHEL71-lhuang                  shut off


2. edit xml and add vcpupin/emulatorpin like this:

  <cputune>
    <vcpupin vcpu='0' cpuset='0,^0'/>
  </cputune>

# virsh edit RHEL71-lhuang
Domain RHEL71-lhuang XML configuration edited.


3. recheck the xml:

# virsh dumpxml RHEL71-lhuang
...
  <cputune>
    <vcpupin vcpu='0' cpuset=''/>
  </cputune>
...

4. restart libvirtd guest will disappear since xml have broken setting:

# service libvirtd restart
Redirecting to /bin/systemctl restart  libvirtd.service

# virsh dumpxml RHEL71-lhuang
error: failed to get domain 'RHEL71-lhuang'
error: Domain not found: no domain with matching name 'RHEL71-lhuang'


Actual results:
when set 0,^0 in cpuset in emulatorpin/vcpupin element, libvirt generate a xml which have broken settings

Expected results:

like iothread, output error:

# virsh edit RHEL71-lhuang
error: unsupported configuration: Invalid value of 'cpuset': 0,^0
Failed. Try again? [y,n,i,f,?]: 


Additional info:

Comment 1 Peter Krempa 2016-01-27 16:31:46 UTC
Fixed upstream:

commit 31b782a147b9b4a9aa758d8eba9fba5b72a6abb1
Author: Peter Krempa <pkrempa>
Date:   Wed Jan 6 15:34:13 2016 +0100

    conf: disallow empty cpusets for vcpu pinning when parsing XML
    
    They are disallowed in the pinning API and as default cpuset.

v1.3.1-66-g7639417

Comment 3 Luyao Huang 2016-06-02 07:34:19 UTC
Verify this bug with libvirt-1.3.4-1.el7.x86_64:

1. prepare a guest:

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel72-test                    shut off

2. add empty cpuset in guest xml

# virsh edit rhel72-test

  <cputune>
    <vcpupin vcpu='0' cpuset='0,^0'/>
  </cputune>

error: unsupported configuration: Invalid value of 'cpuset': 0,^0
Failed. Try again? [y,n,i,f,?]:

Comment 5 errata-xmlrpc 2016-11-03 18:49:51 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/RHSA-2016-2577.html