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 1370360

Summary: libvirt report wrong vcpu order number
Product: Red Hat Enterprise Linux 7 Reporter: Luyao Huang <lhuang>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED ERRATA QA Contact: Jingjing Shao <jishao>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: dyuan, jdenemar, libvirt-maint, pkrempa, rbalakri, xuzhang
Target Milestone: rc   
Target Release: 7.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-2.5.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 17:14:13 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 2016-08-26 03:34:38 UTC
Description of problem:
libvirt report wrong vcpu order number

Version-Release number of selected component (if applicable):
v2.1.0-209-ge3229f6

How reproducible:
100%

Steps to Reproduce:
1. prepare a guest like this:

# virsh dumpxml r7
...
  <vcpu placement='auto' current='3'>12</vcpu>
  <vcpus>
    <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
    <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
    <vcpu id='2' enabled='yes' hotpluggable='yes' order='2'/>

2. start guest:

# virsh start r7
error: Failed to start domain r7
error: unsupported configuration: duplicate vcpu order '1'

3.

Actual results:

libvirt report wrong vcpu order number when use the same order in two vcpu element

Expected results:

# virsh start r7
error: Failed to start domain r7
error: unsupported configuration: duplicate vcpu order '2'

Additional info:

Comment 2 Peter Krempa 2016-09-30 06:31:51 UTC
commit 3d5dd28995efbe1275290d54a2d7766a4f9c7204
Author: Peter Krempa <pkrempa>
Date:   Wed Sep 14 05:58:33 2016 +0200

    qemu: process: Fix off-by-one in vcpu order duplicate error message
    
    The bitmap indexes for the order duplicate check are shifted to 0 since
    vcpu order 0 is not allowed. The error message doesn't need such
    treating though.

Comment 4 Jingjing Shao 2016-12-26 12:49:34 UTC
verified this bug as below:

(1)
#  virsh dumpxml rhel7.3 
<domain type='kvm'>
  <name>rhel7.3</name>
  <uuid>a7b9969c-ef22-4b8b-90aa-28b5e655dff4</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static' current='4'>10</vcpu>
  <vcpus>
    <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
    <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
    <vcpu id='2' enabled='yes' hotpluggable='yes' order='2'/>
...

# virsh start rhel7.3
error: Failed to start domain rhel7.3
error: unsupported configuration: duplicate vcpu order '2'

(2)
# virsh dumpxml rhel7.3 
<domain type='kvm'>
  <name>rhel7.3</name>
  <uuid>a7b9969c-ef22-4b8b-90aa-28b5e655dff4</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static' current='4'>10</vcpu>
  <vcpus>
    <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
    <vcpu id='1' enabled='yes' hotpluggable='yes' order='3'/>
    <vcpu id='2' enabled='yes' hotpluggable='yes' order='2'/>
    <vcpu id='3' enabled='yes' hotpluggable='yes' order='2'/>
.....
# virsh start rhel7.3
error: Failed to start domain rhel7.3
error: unsupported configuration: duplicate vcpu order '2'


(3)
# virsh dumpxml rhel7.3
<domain type='kvm'>
  <name>rhel7.3</name>
  <uuid>a7b9969c-ef22-4b8b-90aa-28b5e655dff4</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static' current='4'>10</vcpu>
  <vcpus>
    <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
    <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
    <vcpu id='2' enabled='yes' hotpluggable='yes' order='3'/>
    <vcpu id='3' enabled='yes' hotpluggable='yes' order='2'/>
......
# virsh start rhel7.3
error: Failed to start domain rhel7.3
error: unsupported configuration: duplicate vcpu order '2'

Comment 5 errata-xmlrpc 2017-08-01 17:14:13 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://access.redhat.com/errata/RHEA-2017:1846

Comment 6 errata-xmlrpc 2017-08-01 23:55:08 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://access.redhat.com/errata/RHEA-2017:1846

Comment 7 errata-xmlrpc 2017-08-02 01:27:35 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://access.redhat.com/errata/RHEA-2017:1846