nova/nova
Nikola Dipanov d6b3156a6c 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
2015-04-09 10:19:42 +01:00
..
CA Make tests use sha256 as openssl default digest algorithm 2015-02-09 10:06:04 -05:00
api Merge "No need to create APIVersionRequest every time" 2015-04-04 02:24:12 +00:00
cells Use cells.utils.ServiceProxy object within cells_api 2015-04-07 23:09:38 +02:00
cert Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
cloudpipe Move policy enforcement into REST API layer for v2.1 cloudpipe 2015-02-26 21:33:47 +08:00
cmd Store cells credentials in transport_url properly 2015-03-31 00:00:20 +00:00
compute Merge "Prevent scheduling new external events when compute is shutdown" 2015-04-08 21:48:02 +00:00
conductor Remove vol_get_usage_by_time from conductor api/rpcapi 2015-03-20 13:29:09 -07:00
console Expand Origin header check for serial console 2015-03-31 16:30:17 -04:00
consoleauth consoleauth: remove an instance of mutation while iterating 2015-04-01 14:52:05 +01:00
db Merge "Make migration 274 idempotent so it can be backported" 2015-04-03 17:50:00 +00:00
hacking Add the last of the oslo libraries to hacking check 2015-03-30 23:58:26 +00:00
image Merge "Remove update_store usage" 2015-03-13 21:28:46 +00:00
ipv6 Replace usage of LazyPluggable by stevedore driver 2015-02-17 14:49:48 +00:00
keymgr Switch to uuidutils from oslo_utils library 2015-02-25 20:05:49 -05:00
locale Imported Translations from Transifex 2015-04-06 06:17:35 +00:00
network Merge "neutronv2: only create client once when adding/removing fixed IPs" 2015-04-06 23:57:10 +00:00
objects Fix Enum field, which allows unrestricted values 2015-04-07 10:29:05 -07:00
objectstore Deprecate Nova in tree EC2 APIs 2015-03-12 17:48:06 -04:00
openstack Print choices in the config generator 2015-04-08 13:41:40 +00:00
pci Merge "Move ComputeNode creation at init stage in ResourceTracker" 2015-03-27 19:28:47 +00:00
rdp Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
scheduler scheduler: re-calculate NUMA on consume_from_instance 2015-04-09 10:19:42 +01:00
servicegroup Remove useless get_one() method in SG API 2015-03-11 23:30:23 +00:00
spice Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
storage Fix multipath device discovery when UFN is enabled. 2015-04-02 13:23:49 +01:00
tests scheduler: re-calculate NUMA on consume_from_instance 2015-04-09 10:19:42 +01:00
virt Merge "Hyper-V: Sets *DataRoot paths for instances" 2015-04-09 09:01:37 +00:00
vnc Use oslo.log 2015-02-22 07:56:40 -05:00
volume Stop using exception.message 2015-03-17 10:30:26 +01:00
__init__.py move eventlet GREENDNS override to top level 2014-12-08 17:41:03 -05:00
availability_zones.py Merge "consoliate set_availability_zones usage" 2015-03-23 06:52:46 +00:00
baserpc.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
block_device.py Use oslo.log 2015-02-22 07:56:40 -05:00
config.py Disable oslo_messaging debug logging 2015-03-19 11:23:05 -07:00
context.py Stop spamming logs when creating context 2015-03-13 17:59:47 -04:00
crypto.py Adds cleanup on v2.2 keypair api and tests 2015-03-24 17:06:18 +02:00
debugger.py Use oslo.log 2015-02-22 07:56:40 -05:00
exception.py libvirt: Add version check when pinning guest CPUs 2015-04-07 10:14:52 +01:00
filters.py Use oslo.log 2015-02-22 07:56:40 -05:00
hooks.py Use oslo.log 2015-02-22 07:56:40 -05:00
i18n.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
loadables.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
manager.py Use oslo.log 2015-02-22 07:56:40 -05:00
netconf.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
notifications.py Be more forgiving to empty context in notification 2015-03-31 00:00:46 +00:00
paths.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
policy.py Add useful debug logging when policy checks fail 2015-02-23 16:44:04 -05:00
quota.py Add some logging in the quota.reserve flow 2015-03-25 14:58:04 -07:00
rpc.py Merge "Ensure publisher_id is set correctly in notifications" 2015-02-10 04:50:54 +00:00
safe_utils.py
service.py Remove usage of db.service_get_by_args 2015-03-06 11:00:22 +00:00
test.py Skip 'id' attribute to be explicitly deleted in TestCase 2015-03-23 15:22:15 +09:00
utils.py Merge "Truncate encoded instance sys meta to 255 or less" 2015-03-12 02:15:05 +00:00
version.py Merge "remove duplicate calls to cfg.get()" 2015-03-18 19:13:55 +00:00
weights.py Make scheduler filters/weighers only load once 2014-12-09 18:58:49 +01:00
wsgi.py create noauth2 2015-03-04 08:09:01 -05:00