nova/nova
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
..
api Merge "trivial: Fetch 'Service' objects once when building AZs" 2020-02-21 17:53:18 +00:00
cmd Minor improvements to cell commands 2020-02-04 19:09:29 +01:00
compute Avoid allocation leak when deleting instance stuck in BUILD 2020-02-24 09:34:02 +00:00
conductor Remove extra instance.save() calls related to qos SRIOV ports 2020-02-03 11:41:38 +01:00
conf Absolutely-non-inheritable image properties 2020-02-17 10:13:54 -05:00
console trivial: Merge unnecessary 'NovaProxyRequestHandlerBase' separation 2020-02-06 15:48:56 +00:00
db Fix instance.hidden migration and querying 2020-02-07 08:54:56 -08:00
hacking Switch to hacking 2.x 2020-01-17 11:30:40 +00:00
image Improve error log when snapshot fails 2019-11-06 22:54:05 +00:00
keymgr
locale Imported Translations from Zanata 2019-12-09 06:44:38 +00:00
network Don't error out on floating IPs without associated ports 2020-02-06 10:04:24 +00:00
notifications nova-net: Remove layer of indirection in 'nova.network' 2020-01-15 14:57:49 +00:00
objects Fix instance.hidden migration and querying 2020-02-07 08:54:56 -08:00
pci support pci numa affinity policies in flavor and image 2019-12-11 14:39:12 +00:00
policies Merge "Introduce scope_types in Admin Actions" 2019-12-26 06:48:34 +00:00
privsep nova-net: Kill it 2020-01-14 21:25:56 +00:00
scheduler Merge "Handle cell failures in get_compute_nodes_by_host_or_node" 2020-01-29 03:52:43 +00:00
servicegroup Handle ServiceNotFound in DbDriver._report_state 2019-12-04 09:50:17 -05:00
tests Avoid allocation leak when deleting instance stuck in BUILD 2020-02-24 09:34:02 +00:00
virt trivial: Update '_get_foo_traits' docstrings 2020-02-20 15:05:31 +00:00
volume Fix exception translation when creating volume 2019-10-10 02:38:33 +00:00
__init__.py
availability_zones.py trivial: Fetch 'Service' objects once when building AZs 2020-02-05 21:26:23 +00:00
baserpc.py
block_device.py hacking: Resolve W605 (invalid escape sequence) 2019-06-24 14:24:06 -05:00
cache_utils.py trivial: Remove unused 'cache_utils' APIs 2020-02-05 17:20:28 +00:00
config.py Rename 'nova.common.config' module to 'nova.middleware' 2019-08-16 00:53:03 +01:00
context.py Revert "Log CellTimeout traceback in scatter_gather_cells" 2019-10-22 17:12:28 -04:00
crypto.py
debugger.py
exception.py Remove unused code 2020-01-20 14:44:54 +00:00
exception_wrapper.py
filters.py filters: Stop handling cells v1 2019-06-12 16:09:46 +01:00
hooks.py
i18n.py
loadables.py trivial: Remove dead code 2019-12-12 10:55:02 +00:00
manager.py
middleware.py Rename 'nova.common.config' module to 'nova.middleware' 2019-08-16 00:53:03 +01:00
monkey_patch.py Bump to hacking 1.1.0 2019-04-12 16:23:49 +01:00
policy.py Fix the suppress of policy deprecation warnings 2020-01-07 17:58:09 +00:00
profiler.py
quota.py nova-net: Remove remaining nova-network quotas 2019-12-02 17:39:23 +00:00
rpc.py Remove unnecessary wrapper 2019-05-29 17:14:13 +01:00
safe_utils.py
service.py nova-net: Remove 'MetadataManager' 2020-01-08 13:54:12 +00:00
service_auth.py
test.py nova-net: Kill it 2020-01-14 21:25:56 +00:00
utils.py trivial: Remove 'run_once' helper 2020-02-06 15:49:07 +00:00
version.py
weights.py
wsgi.py