Incorrect host cpu is given to emulator threads when cpu_realtime_mask flag is set

Bug #1682137 reported by Danil Akhmetov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Sergii Rizvan

Bug Description

There is a bug in Mitaka:

https://bugs.launchpad.net/nova/+bug/1614054

which was fixed in Newton:

https://review.openstack.org/#/c/393487/

Here is backort for 9.0/mitaka:

https://review.fuel-infra.org/#/c/33096/

Could you backport this change to MOS 9 and include it in the following maintenance update?

tags: added: sla2
Changed in mos:
importance: Undecided → High
tags: added: sla1
removed: sla2
Changed in mos:
milestone: 9.x-updates → 9.2-mu-2
assignee: nobody → MOS Maintenance (mos-maintenance)
Changed in mos:
status: New → Confirmed
assignee: MOS Maintenance (mos-maintenance) → Sergey Nikitin (snikitin)
Danil Akhmetov (dinobot)
description: updated
Revision history for this message
Sergey Nikitin (snikitin) wrote :

Patch was created yesterday https://review.fuel-infra.org/#/c/33096/ I don't know why jenkins didn't left comment here about it

description: updated
Changed in mos:
assignee: Sergey Nikitin (snikitin) → MOS Maintenance (mos-maintenance)
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to packages/centos7/python-flake8 (9.0)

Reviewed: https://review.fuel-infra.org/33120
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0

Commit: f89facc064810c7336fe797067a006184f624c9e
Author: Denis V. Meltsaykin <email address hidden>
Date: Fri Apr 14 15:05:53 2017

Relax strict dependency on python-mccabe

Related-bug: #1682137
Change-Id: I5f4cfd9eed58aacc8c17ebfb1b4cc2bd82151778

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/33096
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: 839bf39a822cb1b3424565e783552b0601af0889
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Thu Apr 13 14:41:18 2017

libvirt: fix incorrect host cpus giving to emulator threads when RT

Realtime guarantees in certain operating systems require that the
thread that is running the QEMU emulator is pinned to a physical CPU
that is *not* the same as any physical CPU that the vCPUs for a
realtime guest are pinned to. This patch ensures that the value of the
hw:cpu_realtime_mask flavor extraspec property is respected when
creating the libvirt configuration XML and sets emulatorpin values to
a physical CPU matching the hw:cpu_realtime_mask value.

Change-Id: I7f50dde0753b059a690dc50172fee645c94b8e5b
Closes-Bug: #1682137
(cherry picked from commit 6683bf9b7dc575ef9516f0cdc395b8da1b81c233)

Changed in mos:
status: Confirmed → Fix Committed
tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Bug is checked on 9.2 + mu2 updates, but issue is completely reproduced.

Version of nova packages: 2:13.1.3-7~u14.04+mos35

Steps to verify:
1. Create RT flavor
nova flavor-create m1.small.performance 6 2048 20 2
nova flavor-key m1.small.performance set hw:cpu_realtime=yes
nova flavor-key m1.small.performance set hw:cpu_realtime_mask=^0
nova flavor-key m1.small.performance set hw:cpu_policy=dedicated
2. Boot a instance with this flavor
nova boot --image TestVM --flavor m1.small.performance --nic net-id=7d6d43c5-2e9d-4934-9c53-014990b20b6e VM3
3. Check the xml of the new instance on compute node in /etc/libvirt/qemu folder

Actual results:
Instance is created successfully and has 'ACTIVE' status.
But 'cpuset' of 'emulatorpin' option is still equal to '0' instead of '2':
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='6'/>
    <emulatorpin cpuset='0'/>
    <vcpusched vcpus='1' scheduler='fifo' priority='1'/>
  </cputune>

tags: removed: on-verification
Changed in mos:
status: Fix Committed → Confirmed
Changed in mos:
assignee: MOS Maintenance (mos-maintenance) → MOS Nova (mos-nova)
Changed in mos:
assignee: MOS Nova (mos-nova) → MOS Maintenance (mos-maintenance)
Sergii Rizvan (srizvan)
Changed in mos:
assignee: MOS Maintenance (mos-maintenance) → Sergii Rizvan (srizvan)
Revision history for this message
Sergii Rizvan (srizvan) wrote :

Seems, that Tatyana had some misunderstanding about the issue. We don't need that 'cpuset' of 'emulatorpin' option should equal '2'. We need that 'cpuset' of 'emulatorpin' option should equal 'cpuset' of 'vcpupin' option. And in provided example they both matches '0' which is correct.
That's why it's needed to reverify the patch.

Changed in mos:
status: Confirmed → Fix Committed
Revision history for this message
Vladimir Khlyunev (vkhlyunev) wrote :

Verified python-nova 2:13.1.4-7~u14.04+mos38

Changed in mos:
status: Fix Committed → Fix Released
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/nova (mcp/1.0/mitaka)

Fix proposed to branch: mcp/1.0/mitaka
Change author: Sahid Orentino Ferdjaoui <email address hidden>
Review: https://review.fuel-infra.org/36362

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/nova (mcp/1.0/mitaka)

Change abandoned by Vladyslav Drok <email address hidden> on branch: mcp/1.0/mitaka
Review: https://review.fuel-infra.org/36362

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change restored on openstack/nova (mcp/1.0/mitaka)

Change restored by Vladyslav Drok <email address hidden> on branch: mcp/1.0/mitaka
Review: https://review.fuel-infra.org/36362

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (mcp/1.0/mitaka)

Reviewed: https://review.fuel-infra.org/36362
Submitter: Pkgs Jenkins <email address hidden>
Branch: mcp/1.0/mitaka

Commit: 08d9bed2152896a85190b21e465ba54addc3ca89
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Thu Aug 31 17:38:34 2017

libvirt: fix incorrect host cpus giving to emulator threads when RT

Realtime guarantees in certain operating systems require that the
thread that is running the QEMU emulator is pinned to a physical CPU
that is *not* the same as any physical CPU that the vCPUs for a
realtime guest are pinned to. This patch ensures that the value of the
hw:cpu_realtime_mask flavor extraspec property is respected when
creating the libvirt configuration XML and sets emulatorpin values to
a physical CPU matching the hw:cpu_realtime_mask value.

PROD ticket: https://mirantis.jira.com/browse/PROD-14346

Change-Id: I7f50dde0753b059a690dc50172fee645c94b8e5b
Closes-Bug: #1682137
(cherry picked from commit 6683bf9b7dc575ef9516f0cdc395b8da1b81c233)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.