virt_type=qemu does not support cpu affinity.

Bug #1691178 reported by sean mooney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Undecided
Tetsuro Nakamura

Bug Description

Description
===========
QEMU support a number of different backends for code generation.
Qemu with the TCG(tiny code generator) backend does not support
cpu affinity. the TCG backened is used when the nova
virt_type is set to qemu.

Currently by default when we
request a numa topology nova generates vcpupin elements
that confine the guest vcpus to float only across
the core that are associated with a numa node.

Currently by default when we request hugepage memory
nova implictly generates a numa topology of 1 if no
numa topology is specified.

as a result of the above behavior it is not possible
to spawn a guest a guest with a numa topology or
hugepage memory backing on non kvm/xen acclerated qemu backends
as qemu with the TCG backend does not support cpu affinity.

Steps to reproduce
==================

- deploy nova as normal and set virt_type=qemu in nova.conf.
- set hw:numa_nodes=1 or hw:mem_page_size=large in the nova flavor.
- boot an instance with this modified flavor.

Expected result
===============

vm starts with a virtual numa topology of 1 numa node(hw:numa_nodes=1)
or with hugepage backed memory (hw:mem_page_size=large)

Actual result
=============

nova reports libvirt error that cpu affinity is not support by TCG backend.

logs
====
http://paste.openstack.org/show/609710/

Revision history for this message
sean mooney (sean-k-mooney) wrote :

i will submit a partial fix for this shortly for the numa/hugepage case.

open question should the scheduler be modified to exclude host with hypervior=qemu if dedicated cpus are requested.

Changed in nova:
assignee: nobody → sean mooney (sean-k-mooney)
Revision history for this message
sean mooney (sean-k-mooney) wrote :
description: updated
Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
Sean Dague (sdague)
Changed in nova:
assignee: sean mooney (sean-k-mooney) → nobody
Changed in nova:
status: Confirmed → In Progress
assignee: nobody → Tetsuro Nakamura (tetsuro0907)
Changed in nova:
assignee: Tetsuro Nakamura (tetsuro0907) → Stephen Finucane (stephenfinucane)
Revision history for this message
Tetsuro Nakamura (tetsuro0907) wrote :

Link to gerrit manually...

Fix proposed to branch: master
Review: https://review.openstack.org/#/c/465160

Changed in nova:
assignee: Stephen Finucane (stephenfinucane) → Tetsuro Nakamura (tetsuro0907)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by sean mooney (<email address hidden>) on branch: master
Review: https://review.openstack.org/465160
Reason: im going to abandon this as it now work if you use a cpu_model that is supported by the mttcg backend which is enable by default on new enough qemu versions.
see
https://review.openstack.org/#/c/652197/
as an example of a ci job that uses that fact

Changed in nova:
status: In Progress → Won't Fix
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.