nova/nova/tests/functional
Dan Smith 5d86aa7edb Fix interpretation of max_attempts for scheduling alternates
Since max_attempts is not max_retries, we should look for max_attempts-1
alternate hosts. This change makes the num_alts variable actually reflect
the number of alternates we are looking for, and doesn't actually change
the logic at all. This also adds functional tests to verify max_attempts
behavior with 1 (no retries) and 2 (one retry), just to make sure it is
doing what we expect.

Further, we optimize _get_alternate_hosts() to only re-filter/weigh the
host list if we're looking for alternates for multiple instances. Now
that it's clear that num_alts is only nonzero if we are going to look
at the host list again to find those alternates, it can be more clearly
(and accurately) used to optimize out that extra step if we are not
getting alternates.

Change-Id: I16ba29385dd2db5467829e6c17fc395096b5cfd3
2018-05-18 09:06:07 -07:00
..
api Merge "Add tests for alloc cands with poor local disk" 2018-05-10 02:56:11 +00:00
api_sample_tests Convert fping API to processutils.execute() 2018-05-02 19:05:52 +10:00
compute Make get_instance_objects_sorted() be smart about cells 2018-05-09 12:52:56 -07:00
db Address feedback from instance_list smart-cell behavior 2018-05-10 09:59:36 -07:00
libvirt libvirt: Bump MIN_{LIBVIRT,QEMU}_VERSION for "Rocky" 2018-04-23 17:02:27 +02:00
notification_sample_tests Add request_id to instance action notifications 2018-04-19 13:06:59 -04:00
regressions Merge "libvirt: Bump MIN_{LIBVIRT,QEMU}_VERSION for "Rocky"" 2018-04-24 09:53:43 +00:00
wsgi Cleanup RP and HM records while deleting a compute service. 2018-04-18 19:25:49 -04:00
__init__.py
api_paste_fixture.py Remove legacy v2 API functional tests 2016-05-04 18:17:23 +08:00
api_samples_test_base.py Add pagination and changes-since for instance-actions 2017-12-14 07:42:17 +00:00
integrated_helpers.py Functional test: evacuate with no compute 2018-02-20 13:46:18 +00:00
test_aggregates.py Add require_tenant_aggregate request filter 2018-03-28 15:58:46 -07: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 make microversion a client level construct for tests 2016-02-24 11:02:05 -05:00
test_legacy_v2_compatible_wrapper.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00: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 [api] Allow multi-attach in compute api 2018-01-22 10:45:13 -05:00
test_nova_manage.py Unmap compute nodes when deleting host mappings in delete cell operation 2018-03-15 16:41:03 +00:00
test_report_client.py Move test_report_client out of placement namespace 2018-04-06 22:56:03 +01:00
test_server_group.py Add late server group policy check to rebuild 2018-02-06 13:54:12 +01:00
test_servers.py Fix interpretation of max_attempts for scheduling alternates 2018-05-18 09:06:07 -07:00