nova/nova/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 Remove translation of log messages 2017-06-09 09:06:16 +00:00
__init__.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
api.py Merge "Share snapshot image membership with instance owner" into stable/rocky 2019-06-28 19:17:19 +00:00
build_results.py Compute Add build_instance hook in compute manager 2014-12-04 10:12:00 -05:00
cells_api.py Fix missing marker functions 2018-01-25 03:37:48 +00:00
claims.py [Trivial] docstrings, typos, minor refactoring 2017-08-28 08:33:58 -05:00
flavors.py Remove unused flavor_delete_info() method 2018-08-03 12:44:52 -04:00
instance_actions.py Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
instance_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
manager.py Fix false ERROR message at compute restart 2019-11-27 13:52:43 +01:00
migration_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
multi_cell_list.py Make nova list and migration-list ignore down cells 2018-06-25 17:28:57 -04:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_tree.py Perf: Use dicts for ProviderTree roots 2019-07-10 15:19:45 -05:00
resource_tracker.py rt: only map compute node if we created it 2019-08-13 17:07:53 -04:00
rpcapi.py Add useful error log when _determine_version_cap raises DBNotAllowed 2019-08-30 13:41:35 +00:00
stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
task_states.py Fix resource tracker updates during instance evacuation 2019-03-05 19:22:14 +08:00
utils.py Replace non-nova server fault message 2019-08-06 11:35:58 -04:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00