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 867699 - Improve the error message when pin guest cpu to the offline host cpu
Summary: Improve the error message when pin guest cpu to the offline host cpu
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-18 06:37 UTC by yuping zhang
Modified: 2013-03-04 05:18 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-05 14:55:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yuping zhang 2012-10-18 06:37:02 UTC
Description of problem:
According to patch:[RHEL6.4 libvirt PATCH 2/7] conf: Ignore vcpupin for not onlined vcpus when parsing(http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-October/msg00707.html)
The error message will be "Ignore vcpupin for not onlined vcpus",but now it is :
error: Failed to start domain yuping-rhel6
error: Unable to set cpuset.cpus: Invalid argument
or
error: Requested operation is not valid: failed to set cpuset.cpus in cgroup for vcpu 0

Version-Release number of selected component (if applicable):
libvirt-0.10.2-4.el6.x86_64
qemu-kvm-0.12.1.2-2.320.el6.x86_64
kernel-2.6.32-325.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.My machine include 160 cores  /sys/devices/system/cpu/cpu[0-159]
2.Change the cpu from online to offline
# echo 0 >/sys/devices/system/cpu/cpu3/online
# cat /sys/devices/system/cpu/cpu3/online
0

3.Edit guest xml like this:
#virsh edit guest
...
  <vcpu placement='static' current='1'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='3'/>
  </cputune>
...

4.#virsh start guest
error: Failed to start domain yuping-rhel6
error: Unable to set cpuset.cpus: Invalid argument

Or
In step 3,edit xml like this:
#virsh edit guest
...
  <vcpu placement='static' current='1'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='2'/>
  </cputune>
...
Start the guest,then run
# virsh vcpupin guest 0 3
error: Requested operation is not valid: failed to set cpuset.cpus in cgroup for vcpu 0

Actual results:
As above.

Expected results:
The error message should be
"Ignore vcpupin for not onlined vcpus"

Additional info:

Comment 2 Martin Kletzander 2012-10-18 10:56:06 UTC
The warning message "Ignore vcpupin for not onlined vcpus" you are refering to is related to this kind of configuration:

...
<vcpu placement='static' current='1'>2</vcpu>
<cputune>
  <vcpupin vcpu='1' cpuset='0'/>
</cputune>
...

As you can see, the <vcpupin> is addressing a VCPU that is not currently online on the guest.  Host CPUs are being checked by the kernel when setting cgroups, hence leading to your error message to appear.

In case you have nothing else and I didn't miss anything, I propose to close this BZ as NOTABUG.

Comment 3 yuping zhang 2012-10-18 12:52:53 UTC
(In reply to comment #2)
> The warning message "Ignore vcpupin for not onlined vcpus" you are refering
> to is related to this kind of configuration:
> 
> ...
> <vcpu placement='static' current='1'>2</vcpu>
> <cputune>
>   <vcpupin vcpu='1' cpuset='0'/>
> </cputune>
> ...
> 
> As you can see, the <vcpupin> is addressing a VCPU that is not currently
> online on the guest.  Host CPUs are being checked by the kernel when setting
> cgroups, hence leading to your error message to appear.
> 
> In case you have nothing else and I didn't miss anything, I propose to close
> this BZ as NOTABUG.

Hi Martin,
I still tried this :
#virsh edit guest
...
  <vcpu placement='static' current='1'>4</vcpu>
  <cputune>
        <vcpupin vcpu='1' cpuset='0'/>
  </cputune>
...
Then save,after that,run 
#virsh dumpxml guest
...
  <vcpu placement='static' current='1'>4</vcpu>
  <cputune>
  </cputune>
...

The line <vcpupin vcpu='1' cpuset='0'/> will be removed.The error message still can not pop up.

Comment 4 Martin Kletzander 2012-10-19 08:53:34 UTC
Did you check on the server log?  Also beware this message is not exactly an error, just a warning.

Comment 5 yuping zhang 2012-10-19 09:03:12 UTC
(In reply to comment #4)
> Did you check on the server log?  Also beware this message is not exactly an
> error, just a warning.

Hi Martin,
I check the log,it has this message when save the XML file:
#cat  /var/log/libvirt/libvirtd.log|grep vcpus
2012-10-19 08:58:05.560+0000: 83902: warning : virDomainDefParseXML:8863 : Ignore vcpupin for not onlined vcpus


Also,I did this testing.Start a guest,and the run vcpupin command:
#virsh edit guest
...
<vcpu placement='static' current='1'>4</vcpu>
...
# virsh start guest
# virsh vcpupin guest 1 0
error: vcpupin: Invalid vCPU number.

All of this is expected result.

Comment 6 Martin Kletzander 2013-02-05 14:55:19 UTC
Closing as NOTABUG, because everything is working as expected and no patch was needed.  Feel free to reopen if you disagree.


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