nova/nova/tests/functional
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 Merge "Use common functions in granular fixture" 2018-08-07 23:16:15 +00:00
api_sample_tests Merge "Scrub hw:cpu_model from API samples" 2018-08-03 13:19:28 +00:00
compute Make ResourceTracker.stats node-specific 2018-08-01 11:47:45 -07:00
db Filter out instances without a host when populating AZ 2018-08-21 09:50:30 -04:00
libvirt Merge "Improve NeutronFixture and remove unncessary stubbing" 2018-08-02 17:44:55 +00:00
notification_sample_tests Transform metrics.update notification 2018-07-18 09:13:27 +09:00
regressions libvirt: Remove usage of migrateToURI{2} APIs 2018-07-31 18:57:28 +02:00
wsgi Fix regression when listing build_requests with marker and ip filter 2018-06-19 15:56:27 -04:00
__init__.py move eventlet GREENDNS override to top level 2014-12-08 17:41:03 -05:00
api_paste_fixture.py Remove legacy v2 API functional tests 2016-05-04 18:17:23 +08:00
api_samples_test_base.py Remove unused request API sample template 2018-08-03 07:00:13 +00:00
integrated_helpers.py Add method to get cpu traits 2018-07-24 12:37:46 +00:00
test_aggregates.py mirror nova host aggregate members to placement 2018-05-30 12:45:20 -04:00
test_compute_mgr.py remove unnecessary conf imports 2018-03-09 14:30:10 -05:00
test_images.py Add create image functional negative tests 2016-12-26 14:15:14 +09:00
test_instance_actions.py Improve NeutronFixture and remove unncessary stubbing 2018-08-02 15:15:03 +02:00
test_legacy_v2_compatible_wrapper.py Improve NeutronFixture and remove unncessary stubbing 2018-08-02 15:15:03 +02:00
test_list_servers_ip_filter.py Trivial: Nix duplicate PlacementFixture() in test 2017-12-01 15:39:28 -06:00
test_login.py update api_samples code to use better variables 2015-12-14 11:23:26 +08:00
test_metadata.py Remove unused logging import 2017-02-17 15:17:51 +07:00
test_middleware.py Removes unnecessary utf-8 encoding 2016-12-20 10:27:01 +07:00
test_multiattach.py Improve NeutronFixture and remove unncessary stubbing 2018-08-02 15:15:03 +02:00
test_nova_manage.py Add nova-manage placement sync_aggregates 2018-07-24 11:19:23 -04:00
test_report_client.py Use placement microversion 1.26 in update_from_provider_tree 2018-08-20 11:48:57 -04:00
test_server_group.py Make scheduler.utils.setup_instance_group query all cells 2018-09-05 16:32:42 +00:00
test_servers.py Merge "Add functional test for forced live migration rollback allocs" 2018-08-09 00:24:57 +00:00