Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1479794

Summary: CPU pinning does not work
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: Backend.CoreAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.0CC: alukiano, bugs, dfediuck
Target Milestone: ovirt-4.2.0Keywords: Regression, Triaged
Target Release: ---Flags: rule-engine: ovirt-4.2+
gklein: blocker+
rule-engine: planning_ack+
dfediuck: devel_ack+
rule-engine: testing_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:26:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

Description Artyom 2017-08-09 12:17:43 UTC
Created attachment 1311180 [details]
logs

Description of problem:
CPU pinning does not work

Version-Release number of selected component (if applicable):
vdsm-4.20.2-25.git7499b81.el7.centos.x86_64
ovirt-engine-4.2.0-0.0.master.20170803140556.git1e7d0dd.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:
1. Pin VM to host
2. Add CPU pinning to VM, for example, 0#0_1#3
3. Start the VM

Actual results:
VM CPU 0 does not pinned to host CPU 0 and VM CPU 1 does not pinned to host CPU 3
# virsh -r vcpuinfo 10
VCPU:           0
CPU:            8
State:          running
CPU time:       13.8s
CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyy

VCPU:           1
CPU:            7
State:          running
CPU time:       6.2s
CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyy

# virsh -r vcpuinfo 10
VCPU:           0
CPU:            4
State:          running
CPU time:       14.0s
CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyy

VCPU:           1
CPU:            2
State:          running
CPU time:       6.3s
CPU Affinity:   yyyyyyyyyyyyyyyyyyyyyyyy


Expected results:
VM CPU 0 must be pinned to host CPU 0 and VM CPU 1 must be pinned to host CPU 3

Additional info:

Comment 1 Doron Fediuck 2017-08-10 09:02:58 UTC
Looking at the engine log shows an attempt to pin all vcpus to the same physical cpu:
        <cputune>
            <vcpupin cpuset="0" vcpu="0"/>
            <vcpupin cpuset="0" vcpu="1"/>
            <vcpupin cpuset="0" vcpu="2"/>
            <vcpupin cpuset="0" vcpu="3"/>
            <vcpupin cpuset="0" vcpu="4"/>
            <vcpupin cpuset="0" vcpu="5"/>
            <vcpupin cpuset="0" vcpu="6"/>
            <vcpupin cpuset="0" vcpu="7"/>
            <vcpupin cpuset="0" vcpu="8"/>
            <vcpupin cpuset="0" vcpu="9"/>
            <vcpupin cpuset="0" vcpu="10"/>
            <vcpupin cpuset="0" vcpu="11"/>
        </cputune>

What was the configuration string you used?
Are you doing it with the GUI or the API?
Are you seeing the problem in both ends?

Comment 2 Artyom 2017-08-10 10:38:48 UTC
If you will check the steps, you can see that I use string 0#0_1#3
The problem relevant for REST and UI.

Comment 3 Artyom 2017-09-07 12:44:04 UTC
Verified on ovirt-engine-4.2.0-0.0.master.20170906185835.gitcee3e58.el7.centos.noarch

Comment 4 Sandro Bonazzola 2017-12-20 11:26:50 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.