nova/nova/compute
melanie witt 35112d7667 Handle instance = None in _local_delete_cleanup
Change I4d3193d8401614311010ed0e055fcb3aaeeebaed added some
additional local delete cleanup to prevent leaking of placement
allocations. The change introduced a regression in our "delete while
booting" handling as the _local_delete_cleanup required a valid
instance object to do its work and in two cases, we could have
instance = None from _lookup_instance if we are racing with a create
request and the conductor has deleted the instance record while we
are in the middle of processing the delete request.

This handles those scenarios by doing two things:

  (1) Changing the _local_delete_cleanup and
      _update_queued_for_deletion methods to take an instance UUID
      instead of a full instance object as they really only need the
      UUID to do their work
  (2) Saving a copy of the instance UUID before doing another instance
      lookup which might return None and passing that UUID to the
      _local_delete_cleanup and _update_queued_for_deletion methods

Closes-Bug: #1914777

Change-Id: I03cf285ad83e09d88cdb702a88dfed53c01610f8
(cherry picked from commit 123f6262f6)
2021-02-23 20:12:47 +00:00
..
monitors Remove six.add_metaclass 2020-08-15 07:45:39 +00:00
__init__.py Remove nova.compute.*API() shims 2019-06-12 16:09:46 +01:00
api.py Handle instance = None in _local_delete_cleanup 2021-02-23 20:12:47 +00:00
build_results.py
claims.py objects: Add MigrationTypeField 2020-05-08 14:45:54 +01:00
flavors.py trivial: Remove dead code 2019-12-12 10:55:02 +00:00
instance_actions.py Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
instance_list.py Plumbing for ignoring list_records_by_skipping_down_cells 2019-02-08 16:28:28 -05:00
manager.py Merge "Disallow CONF.compute.max_disk_devices_to_attach = 0" into stable/victoria 2021-02-17 16:30:47 +00:00
migration_list.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
multi_cell_list.py Remove six.add_metaclass 2020-08-15 07:45:39 +00:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_config.py Provider Config File: Coding style and test cases improvement 2020-09-01 01:05:34 +00:00
provider_tree.py Add resources dict into _Provider 2019-09-13 08:50:35 +00:00
resource_tracker.py Set instance host and drop migration under lock 2020-11-18 11:36:36 +01:00
rpcapi.py Update compute rpc version alias for victoria 2020-09-12 01:29:34 +09: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 2018-09-12 13:05:29 +03:00
utils.py virt: Remove 'is_xenapi' helper 2020-09-11 14:09:06 +01:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00