DELETE /os-services/{service_id} does not block for hosted instances
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Matt Riedemann | ||
Pike |
Fix Committed
|
High
|
Matt Riedemann | ||
Queens |
Fix Committed
|
High
|
Matt Riedemann |
Bug Description
This came up while reviewing the fix for bug 1756179:
https:/
Full IRC conversation is here:
The summary is that it's possible to delete a compute service and it's associated compute node record even if that compute node has instances on it.
Before placement, this wasn't a huge problem because you could evacuate the instances to another host or if you brought the host back up, it will recreate the service and compute node and the resource tracker will "heal" itself by finding instances running on that host and node combo:
The problem is after we started requiring placement, and creating allocations in the scheduler in Pike, those allocations are against the compute_nodes.uuid for the compute node resource provider. If the service and it's related compute node record are deleted, restarting the service will create a new service and compute node record with a new UUID which will result in a new resource provider in placement, and the instances running on that host will have allocations against the now orphaned resource provider. The new resource provider will be reporting incorrect consumption so scheduling will also be affected.
So we should block deleting a compute service (and it's node) here:
If that host (node) has instances on it.
This problem goes back to Pike. Ocata is OK in that the resource tracker on Ocata computes will "heal" allocations during the update_
Changed in nova: | |
assignee: | nobody → Matt Riedemann (mriedem) |
Fix proposed to branch: master /review. openstack. org/560674
Review: https:/