Stephen Finucane 737e0c0111 tests: Add reproducer for bug #1889633
With the introduction of the cpu-resources work [1], (libvirt) hosts can
now report 'PCPU' inventory separate from 'VCPU' inventory, which is
consumed by instances with pinned CPUs ('hw:cpu_policy=dedicated'). As
part of that effort, we had to drop support for the ability to boot
instances with 'hw:cpu_thread_policy=isolate' (i.e. I don't want
hyperthreads) on hosts with hyperthreading. This had been previously
implemented by marking thread siblings of the host cores used by such an
instance as reserved and unusable by other instances, but such a design
wasn't possible in world where we had to track resource consumption in
placement before landing in the host. Instead, the 'isolate' policy now
simply means "give me a host without hyperthreads". This is enforced by
hosts with hyperthreads reporting the 'HW_CPU_HYPERTHREADING' trait, and
instances with the 'isolate' policy requesting
'HW_CPU_HYPERTHREADING=forbidden'.

Or at least, that's how it should work. We also have a fallback query
for placement to find hosts with 'VCPU' inventory and that doesn't care
about the 'HW_CPU_HYPERTHREADING' trait. This was envisioned to ensure
hosts with old style configuration ('[DEFAULT] vcpu_pin_set') could
continue to be scheduled to. We figured that this second fallback query
could accidentally pick up hosts with new-style configuration, but we
are also tracking the available and used cores from those listed in the
'[compute] cpu_dedicated_set' as part of the host 'NUMATopology' objects
(specifically, via the 'pcpuset' and 'cpu_pinning' fields of the
'NUMACell' child objects). These are validated by both the
'NUMATopologyFilter' and the virt driver itself, which means hosts with
new style configuration that got caught up in this second query would be
rejected by this filter or by a late failure on the host. (Hint: there's
much more detail on this in the spec).

Unfortunately we didn't think about hyperthreading. If a host gets
picked up in the second request, it might well have enough PCPU
inventory but simply be rejected in the first query since it had
hyperthreads. In this case, because it has enough free cores available
for pinning, neither the filter nor the virt driver will reject the
request, resulting in a situation whereby the instance ends up falling
back to the old code paths and consuming $flavor.vcpu host cores, plus
the thread siblings for each of these cores. Despite this, it will be
marked as consuming $flavor.vcpu VCPU (not PCPU) inventory in placement.

This patch proves this to be the case, allowing us to resolve the issue
later.

[1] https://specs.openstack.org/openstack/nova-specs/specs/train/approved/cpu-resources.html

Change-Id: I87cd4d14192b1a40cbdca6e3af0f818f2cab613e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Related-Bug: #1889633
2020-07-31 13:27:16 +01:00
2020-05-20 21:56:41 +02:00
2020-05-15 15:59:53 +01:00
2019-04-19 19:45:52 +00:00
2020-01-17 11:30:40 +00:00
2017-11-24 16:51:12 -05:00
2017-09-07 15:42:31 +02:00
2020-07-08 15:12:21 +01:00
2020-05-15 15:59:53 +01:00
2017-03-02 11:50:48 +00:00

==============
OpenStack Nova
==============

.. image:: https://governance.openstack.org/tc/badges/nova.svg
    :target: https://governance.openstack.org/tc/reference/tags/index.html

.. Change things from this point on


OpenStack Nova provides a cloud computing fabric controller, supporting a wide
variety of compute technologies, including: libvirt (KVM, Xen, LXC and more),
Hyper-V, VMware, XenServer, OpenStack Ironic and PowerVM.

Use the following resources to learn more.

API
---

To learn how to use Nova's API, consult the documentation available online at:

- `Compute API Guide <https://docs.openstack.org/api-guide/compute/>`__
- `Compute API Reference <https://docs.openstack.org/api-ref/compute/>`__

For more information on OpenStack APIs, SDKs and CLIs in general, refer to:

- `OpenStack for App Developers <https://www.openstack.org/appdev/>`__
- `Development resources for OpenStack clouds
  <https://developer.openstack.org/>`__

Operators
---------

To learn how to deploy and configure OpenStack Nova, consult the documentation
available online at:

- `OpenStack Nova <https://docs.openstack.org/nova/>`__

In the unfortunate event that bugs are discovered, they should be reported to
the appropriate bug tracker. If you obtained the software from a 3rd party
operating system vendor, it is often wise to use their own bug tracker for
reporting problems. In all other cases use the master OpenStack bug tracker,
available at:

- `Bug Tracker <https://bugs.launchpad.net/nova>`__

Developers
----------

For information on how to contribute to Nova, please see the contents of the
CONTRIBUTING.rst.

Any new code must follow the development guidelines detailed in the HACKING.rst
file, and pass all unit tests.

Further developer focused documentation is available at:

- `Official Nova Documentation <https://docs.openstack.org/nova/>`__
- `Official Client Documentation
  <https://docs.openstack.org/python-novaclient/>`__

Other Information
-----------------

During each `Summit`_ and `Project Team Gathering`_, we agree on what the whole
community wants to focus on for the upcoming release. The plans for nova can
be found at:

- `Nova Specs <http://specs.openstack.org/openstack/nova-specs/>`__

.. _Summit: https://www.openstack.org/summit/
.. _Project Team Gathering: https://www.openstack.org/ptg/
S
Description
No description provided
Readme 258 MiB
Languages
Python 97.5%
Smarty 2.3%
Shell 0.2%