Allocations are not cleaned up in placement for instance 'local delete' case
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
Pike |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Queens |
Fix Committed
|
Medium
|
Matt Riedemann |
Bug Description
This is semi-related to bug 1661312 for evacuate.
This is the case:
1. Create an instance on host A successfully. There are allocation records in the placement API for the instance (consumer for the allocation records) and host A (resource provider).
2. Host A goes down.
3. Delete the instance. This triggers the local delete flow in the compute API where we can't RPC cast to the compute to delete the instance because the nova-compute service is down. So we do the delete in the database from the compute API (local to compute API, hence local delete).
The problem is in #3 we don't remove the allocations for the instance from the host A resource provider during the local delete flow.
Maybe this doesn't matter while host A is down, since the scheduler can't schedule to it anyway. But if host A comes back up, it will have allocations tied to it for deleted instances.
On init_host in the compute service we call _complete_
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in nova: | |
assignee: | nobody → Sylvain Bauza (sylvain-bauza) |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
assignee: | Sylvain Bauza (sylvain-bauza) → nobody |
Changed in nova: | |
assignee: | nobody → Matt Riedemann (mriedem) |
There might be something in the periodic resource tracker updates that fixes the allocations once host A comes back up, but I'm not sure.
We probably need a functional test to run this scenario and see what happens.