5d86aa7edb
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 |
||
---|---|---|
.. | ||
api | ||
api_sample_tests | ||
compute | ||
db | ||
libvirt | ||
notification_sample_tests | ||
regressions | ||
wsgi | ||
__init__.py | ||
api_paste_fixture.py | ||
api_samples_test_base.py | ||
integrated_helpers.py | ||
test_aggregates.py | ||
test_compute_mgr.py | ||
test_images.py | ||
test_instance_actions.py | ||
test_legacy_v2_compatible_wrapper.py | ||
test_list_servers_ip_filter.py | ||
test_login.py | ||
test_metadata.py | ||
test_middleware.py | ||
test_multiattach.py | ||
test_nova_manage.py | ||
test_report_client.py | ||
test_server_group.py | ||
test_servers.py |