nova/nova/tests/unit/compute
Balazs Gibizer 64f797a051 Fix false ERROR message at compute restart
If an empty compute is restarted a false ERROR message was printed in
the log as the placement report client does not distinguish between
error from placement from empty allocation dict from placement.

This patch changes get_allocations_for_resource_provider to return None
in case of error instead of an empty dict. This is in line with
@safe_connect that would make the call return None as well. The
_error_out_instances_whose_build_was_interrupted also is changed to check
for None instead of empty dict before reporting the ERROR. The only
other caller of get_allocations_for_resource_provider was already
checking for None and converting it to an empty dict so from that caller
perspective this is compatible change on the report client.

This is stable only change as get_allocations_for_resource_provider was
improved during stein[1] to raise on placement error.

[1]I020e7dc47efc79f8907b7bfb753ec779a8da69a1

Change-Id: I6042e493144d4d5a29ec6ab23ffed6b3e7f385fe
Closes-Bug: #1852759
2019-11-27 13:52:43 +01:00
..
monitors Allow monitor plugins to set own metric object 2016-06-27 14:38:32 +05:30
__init__.py
eventlet_utils.py
fake_resource_tracker.py rt: explicitly pass compute node to _update() 2017-01-12 11:30:03 -08:00
test_claims.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_compute.py Replace non-nova server fault message 2019-08-06 11:35:58 -04:00
test_compute_api.py Fix non-existent method of Mock 2019-08-16 09:13:37 +09:00
test_compute_cells.py Fix host validity check for live-migration 2018-08-08 15:02:13 +00:00
test_compute_mgr.py Fix false ERROR message at compute restart 2019-11-27 13:52:43 +01:00
test_compute_utils.py Heal RequestSpec.is_bfv for legacy instances during moves 2018-07-23 12:24:10 -04:00
test_compute_xen.py Remove mox in nova/tests/unit/virt/xenapi/stubs.py 2018-06-21 23:59:39 +00:00
test_flavors.py Make compute unit tests inherit from test.NoDBTestCase 2015-02-24 17:54:29 +02:00
test_host_api.py Enforce case-sensitive hostnames in aggregate host add 2018-09-25 19:08:25 -04:00
test_instance_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_keypairs.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_multi_cell_list.py Some nit fix in multi_cell_list 2017-12-13 14:27:20 +08:00
test_provider_tree.py Add method to get cpu traits 2018-07-24 12:37:46 +00:00
test_resource_tracker.py rt: only map compute node if we created it 2019-08-13 17:07:53 -04:00
test_rpcapi.py Add useful error log when _determine_version_cap raises DBNotAllowed 2019-08-30 13:41:35 +00:00
test_shelve.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
test_virtapi.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00