nova/nova
melanie witt 3051a0d5d5 Make scheduler.utils.setup_instance_group query all cells
To check affinity and anti-affinity policies for scheduling instances,
we use the RequestSpec.instance_group.hosts field to check the hosts
that have group members on them. Access of the 'hosts' field calls
InstanceGroup.get_hosts during a lazy-load and get_hosts does a query
for all instances that are members of the group and returns their hosts
after removing duplicates. The InstanceList query isn't targeting any
cells, so it will return [] in a multi-cell environment in both the
instance create case and the instance move case. In the move case, we
do have a cell-targeted RequestContext when setup_instance_group is
called *but* the RequestSpec.instance_group object is queried early in
compute/api before we're targeted to a cell, so a call of
RequestSpec.instance_group.get_hosts() will result in [] still, even
for move operations.

This makes setup_instance_group query all cells for instances that are
members of the instance group if the RequestContext is untargeted, else
it queries the targeted cell for the instances.

Closes-Bug: #1746863

Change-Id: Ia5f5a0d75953b1154a8de3e1eaa15f8042e32d77
(cherry picked from commit 14f4c502f9)
2018-09-05 16:32:42 +00:00
..
api placement: ignore policy scope check failures if not enforcing scope 2018-08-15 00:43:38 +00:00
cells
cmd Reload oslo_context after calling monkey_patch() 2018-08-01 13:54:31 +03:00
common
compute Merge "Update nova network info when doing rebuild for evacuate operation" 2018-08-09 12:06:07 +00:00
conductor Merge "In Python3.7 async is a keyword [1]" 2018-08-03 00:58:06 +00:00
conf Correct the release notes related to nova-consoleauth 2018-08-23 20:57:14 +00:00
console Use nova.db.api directly 2018-07-10 14:56:27 +00:00
consoleauth
db [placement] Move resource_class_cache into placement hierarchy 2018-08-03 14:55:49 +01:00
hacking Use nova.db.api directly 2018-07-10 14:56:27 +00:00
image Implement certificate_utils 2018-06-12 14:44:32 -04:00
ipv6
keymgr
locale Imported Translations from Zanata 2018-07-13 06:58:20 +00:00
network Merge "Assorted cleanups from numa-aware-vswitches series" 2018-07-29 03:41:15 +00:00
notifications Transform metrics.update notification 2018-07-18 09:13:27 +09:00
objects Make scheduler.utils.setup_instance_group query all cells 2018-09-05 16:32:42 +00:00
pci network: update pci request spec to handle trusted tags 2018-05-31 13:55:40 -04:00
policies Remove support for /os-floating-ip-dns REST API 2018-07-18 22:23:45 -04:00
privsep Merge "Revert "Re-using the code of os brick cinder"" 2018-06-19 02:08:35 +00:00
scheduler Make scheduler.utils.setup_instance_group query all cells 2018-09-05 16:32:42 +00:00
servicegroup
tests Make scheduler.utils.setup_instance_group query all cells 2018-09-05 16:32:42 +00:00
virt Merge "libvirt: Don't react to VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED events" into stable/rocky 2018-08-24 04:14:02 +00:00
vnc
volume Remove unnecessary parameters from create volume API 2018-06-12 12:06:41 +05:30
__init__.py
availability_zones.py
baserpc.py
block_device.py
cache_utils.py
config.py Set default of oslo.privsep.daemon logging to INFO level 2018-07-30 17:06:10 +00:00
context.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
crypto.py Convert certificate generation to processutils. 2018-05-02 19:18:41 +10:00
debugger.py
exception.py Merge "libvirt: Start populating NUMACell.network_metadata field" 2018-07-28 12:50:27 +00:00
exception_wrapper.py Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
filters.py
hooks.py
i18n.py correct referenced url in comments 2018-01-18 09:16:37 +08:00
loadables.py
manager.py conf: Remove 'db_driver' config opt 2018-03-16 17:23:16 +00:00
policy.py
profiler.py
quota.py Merge "Avoid joins in _server_group_count_members_by_user" 2018-08-07 23:16:06 +00:00
rc_fields.py Nix unused raise_if_custom_resource_class_pre_v1_1 2018-06-18 19:52:45 +00:00
rpc.py Use oslo.messaging per-call monitoring 2018-06-11 14:44:10 -07:00
safe_utils.py
service.py Deprecate running API services under eventlet 2018-05-16 03:48:32 +00:00
service_auth.py
test.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
utils.py Adapter raise_exc=False by default 2018-06-22 09:40:33 -05:00
version.py
weights.py
wsgi.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00