nova/nova/tests
Alexandre Arents f35930eef8 Avoid allocation leak when deleting instance stuck in BUILD
During instance build, conductor claim resources to scheduler
and create instance DB entry in cell.

If for any reason conductor is not able to complete a build after
instance claim (ex: AMQP issues, conductor restart before build completes)
and in the mean time user requests deletion of its stuck instance in BUILD,
nova api will delete build_request but let allocation in place resulting
in a leak.

The change proposes that nova api ensures allocation cleanup is made
in case of ongoing/incomplete build.
Note that because build did not reach a cell, compute is not able to heal
allocation during its periodic update_available_resource task.
Furthermore, it ensures that instance mapping is also queued for deletion.

Change-Id: I4d3193d8401614311010ed0e055fcb3aaeeebaed
Closes-Bug: #1859496
2020-02-24 09:34:02 +00:00
..
functional Avoid allocation leak when deleting instance stuck in BUILD 2020-02-24 09:34:02 +00:00
unit Avoid allocation leak when deleting instance stuck in BUILD 2020-02-24 09:34:02 +00:00
__init__.py
fixtures.py trivial: Fetch 'Service' objects once when building AZs 2020-02-05 21:26:23 +00:00
json_ref.py Transform instance.exists notification 2018-06-05 12:51:30 +00:00