Deleting compute service only deletes "first" ironic node resource provider from placement
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Matt Riedemann | ||
Ocata |
In Progress
|
Medium
|
Matt Riedemann | ||
Pike |
Fix Released
|
Medium
|
Matt Riedemann | ||
Queens |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Rocky |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Stein |
Fix Committed
|
Medium
|
Matt Riedemann |
Bug Description
NB: This comes from code inspection, not observed behavior.
When the compute service is deleted, we attempt to delete from placement the resource provider associated with the compute node associated with the service [1].
But ironic deployments can have multiple compute nodes. In this case, the compute node associated with the service is the "first" such node [2].
What happens then is the compute node records are deleted, leaving the remaining N-1 nodes' provider records orphaned. Those get cleaned up (I think?) by update_
So we're deleting and recreating the ironic node resource providers, but in a weird order. We should probably either fix the code at [1] to delete all of them, or none of them (and let the orphan handling code do all the work).
[1] https:/
[2] https:/
[3] https:/
Changed in nova: | |
assignee: | nobody → Matt Riedemann (mriedem) |
I don't think [3] is doing what you'd expect for cleaning up orphans since it won't return compute nodes records from the database if the API deleted them:
https:/ /github. com/openstack/ nova/blob/ da98f4ba4554139 b3901103aa0d268 76b11e1d9a/ nova/compute/ manager. py#L7777
So that for loop here:
https:/ /github. com/openstack/ nova/blob/ da98f4ba4554139 b3901103aa0d268 76b11e1d9a/ nova/compute/ manager. py#L7758
Could just be an empty list, right?