nova/nova/tests
Nikola Dipanov 880a356e40 scheduler: re-calculate NUMA on consume_from_instance
This patch narrows down the race window between the filter running and
the consumption of resources from the instance after the host has been
chosen.

It does so by re-calculating the fitted NUMA topology just before consuming it
from the chosen host. Thus we avoid any locking, but also make sure that
the host_state is kept as up to date as possible for concurrent
requests, as there is no opportunity for switching threads inside a
consume_from_instance.

Several things worth noting:
  * Scheduler being lock free (and thus racy) does not really affect
  resources other than PCI and NUMA topology this badly - this is due
  to complexity of said resources. In order for scheduler decesions to not
  be based on basically guessing, in case of those two we will likely need
  to introduce either locking or special heuristics.

  * There is a lot of repeated code between the 'consume_from_instance'
  method and the actual filters. This situation should really be fixed but
  is out of scope for this bug fix (which is about preventing valid
  requests failing because of races in the scheduler).

Change-Id: If0c7ad20506c9dddf4dec1eb64c9d6dd4fb75633
Closes-bug: #1438238
(cherry picked from commit d6b3156a6c)
2015-04-21 10:37:33 +01:00
..
functional Fix how service objects are looked up for Cells 2015-04-09 13:06:06 +02:00
unit scheduler: re-calculate NUMA on consume_from_instance 2015-04-21 10:37:33 +01:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fixtures.py Add a fixture for the NovaObject indirection API 2015-03-23 18:46:11 +01:00