nova/nova/scheduler
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
..
client Convert pci_device_pools dict to object before passing to scheduler 2015-03-25 10:12:48 -07:00
filters scheduler: re-calculate NUMA on consume_from_instance 2015-04-21 10:37:33 +01:00
weights Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
__init__.py Improve hacking rule to avoid author markers 2014-05-05 14:35:20 +02:00
caching_scheduler.py Add a caching scheduler driver 2014-02-26 13:53:07 +00:00
chance.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
driver.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
filter_scheduler.py Display host chosen for instance by scheduler 2015-02-27 14:17:07 +00:00
host_manager.py scheduler: re-calculate NUMA on consume_from_instance 2015-04-21 10:37:33 +01:00
ironic_host_manager.py Merge "add ironic hypervisor type" 2015-04-09 16:13:17 +00:00
manager.py Add the RPC calls for instance updates. 2015-03-17 23:03:53 +00:00
rpcapi.py Add the RPC calls for instance updates. 2015-03-17 23:03:53 +00:00
scheduler_options.py Don't add exception instance in LOG.exception 2015-03-09 09:57:25 +00:00
utils.py Pass instance object to add_instance_fault_from_exc 2015-03-30 13:20:43 -04:00