Comment 2 for bug 1848343

Revision history for this message
Matt Riedemann (mriedem) wrote : Re: MigrationTask rollback can leak allocations for a deleted server

I think we can claim this as a regression going back to migration-based allocations added in Queens. Looking at where a resize would fail during prep_resize in Pike, we call this method to remove the 'doubled up' allocations or the instance:

https://github.com/openstack/nova/blob/stable/pike/nova/scheduler/client/report.py#L1028

That's to remove the dest host provider from the allocations created by the scheduler.

In this case if the instance was deleted concurrently and had no allocations, we'd get here and return False:

https://github.com/openstack/nova/blob/stable/pike/nova/scheduler/client/report.py#L1062

And we'd log an error there and here in the resource tracker:

https://github.com/openstack/nova/blob/stable/pike/nova/compute/resource_tracker.py#L1320

But we wouldn't leak any allocations for the deleted instance which is the bug we have since Queens when reverting the allocation swap and the instance is gone.