Description of problem: When instances on a compute node are evacuated, allocations about these evacuated instances are still left on that source node. These allocations are deleted when the nova-compute service on that node is again started. However if the compute node is completely broken, it is not possible to start nova-compute service again. In this situation a user is likely to remove the compute node. Because allocation records are left on the node, "openstack compute service delete" removes only the service record and leave the resource provider record[1]. https://github.com/openstack/nova/blob/1aa571103f90228ddf3dc27386486196ad58ba0e/nova/scheduler/client/report.py#L2152-L2156 If a user tries to delete the remaining resource provider record, the delete request is rejected because allocations are still left. The resource provider record left prevents adding back nova-compute service when a user tries to readd a new compute node with the same hostname. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Deploy overcloud with multiple compute nodes and create instances on one of them 2. Shutoff one of the compute nodes 3. Evacuate instances from the compute node 4. Delete nova-compute service of the compute node 5. Delete resource provider record of the compute node Actual results: the resource provider record is left after step 4, and can't be deleted in step 5. Expected results: the resource provider record is deleted by step 4 or can be deleted in step 5. Additional info:
Make sure to cherry-pick https://review.opendev.org/c/openstack/nova/+/844753 to 17.1 once that lands on upstream wallaby.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (RHOSP 17.1.4 bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2024:9974