Bug 1316371

Summary: libvirt auto remove the vcpupin config when cold-unplug vcpu
Product: Red Hat Enterprise Linux 7 Reporter: Luyao Huang <lhuang>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: jishao, pkrempa, rbalakri
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.3.3-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 18:39:06 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-03-10 06:13:24 UTC
Description of problem:
libvirt auto remove the vcpupin config when cold-unplug vcpu

Version-Release number of selected component (if applicable):
v1.3.2-98-gadefc56

How reproducible:
100%

Steps to Reproduce:
1.
# virsh dumpxml rhel7.0-rhel

  <vcpu placement='static' cpuset='1-3'>4</vcpu>

2.
# virsh vcpupin rhel7.0-rhel --config
VCPU: CPU Affinity
----------------------------------
   0: 1-3
   1: 1-3
   2: 1-3
   3: 1-3

3.
# virsh vcpupin rhel7.0-rhel 3 3 --config

4.
# virsh vcpupin rhel7.0-rhel --config
VCPU: CPU Affinity
----------------------------------
   0: 1-3
   1: 1-3
   2: 1-3
   3: 3

5.
# virsh setvcpus rhel7.0-rhel 3 --config

6.
# virsh vcpupin rhel7.0-rhel --config
VCPU: CPU Affinity
----------------------------------
   0: 1-3
   1: 1-3
   2: 1-3
   3: 1-3

Actual results:
libvirt auto remove the vcpupin config when cold-unplug vcpu

Expected results:
libvirt support cpu inactive bind now, so this extra step (i mean help to remove vcpupin for inactive vcpu) is not correct now

Additional info:

Comment 2 Peter Krempa 2016-03-10 15:03:17 UTC
Fixed upstream:

commit ab3f1428a6ae626e85da9b84db027bfb9132138a
Author: Peter Krempa <pkrempa>
Date:   Thu Mar 10 09:37:08 2016 +0100

    qemu: cpu: Don't remove pinning of cold-unplugged cpu
    
    After adding support for offline vcpu pinning the code that removes the
    pinning for cpu cold-unplug was forgotten. This fixes up commit 02ae21d

v1.3.2-103-gab3f142

Comment 3 Mike McCune 2016-03-28 23:19:36 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 5 Jingjing Shao 2016-08-09 03:31:46 UTC
Verify this issue as below
# rpm -q libvirt
libvirt-2.0.0-3.el7.x86_64

# virsh dumpxml r7.2 | grep vcpu 
  <vcpu placement='static' cpuset='1-3'>4</vcpu>

# virsh vcpupin r7.2  3 3 --config

# virsh vcpupin  r7.2  --config
VCPU: CPU Affinity
----------------------------------
   0: 1-3
   1: 1-3
   2: 1-3
   3: 3

# virsh setvcpus r7.2  3 --config

# virsh vcpupin r7.2  --config
VCPU: CPU Affinity
----------------------------------
   0: 1-3
   1: 1-3
   2: 1-3
   3: 3


The result is as expect, so change the status to verified

Comment 7 errata-xmlrpc 2016-11-03 18:39:06 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