nova/nova/tests
Alexander Schmidt 0696a5cd5f Add handling for offlined CPUs to the nova libvirt driver.
When a host system has CPUs that are offlined via CPU hotplug, nova
fails to start an instance on the host. Currently the libvirt driver
does not check if the CPUs it selects for running the instance are
online or offline. As a result, CPUs that are offline can become
part of the cpuset that is passed to libvirt. Libvirt presents
the following error in this case:

libvirtError: Invalid value '8-15,24-31' for 'cpuset.cpus': Invalid
argument

With this fix, the nova libvirt driver makes use of the getCPUMap
API in libvirt to determine if CPUs are online or offline. When
selecting a CPU set for running an instance, offline CPUs are
masked out.

Rationale: on server platforms like s390, it is common to have offlined
CPUs on a host as the platform offers capabilities to run multiple host
operatings systems (e.g. multiple KVM hypervisors / compute nodes). CPUs
can dynamically be assigned to the different host operating systems, so
it is common to have offlined CPUs on a compute node.

Change-Id: I506ebc9608e17e02d807e5002fe867309c22aafc
Closes-Bug: #1417144
2015-02-17 18:34:09 +01:00
..
functional Merge "Adds infrastructure for microversioned api samples" 2015-02-16 15:32:41 +00:00
unit Add handling for offlined CPUs to the nova libvirt driver. 2015-02-17 18:34:09 +01:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fixtures.py patch out nova libvirt driver event thread in tests 2015-02-13 08:54:03 -05:00