Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1982051

Summary: resource provider record is not deleted by service delete if any allocation is left on the node after evacuation
Product: Red Hat OpenStack Reporter: Takashi Kajinami <tkajinam>
Component: openstack-novaAssignee: Amit Uniyal <auniyal>
Status: CLOSED ERRATA QA Contact: OSP DFG:Compute <osp-dfg-compute>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: alifshit, dasmith, eglynn, jhakimra, kchamart, lyarwood, mariel, mwitt, sbauza, sgordon, smooney, stephenfin, vromanso
Target Milestone: z4Keywords: Patch, Reopened, Triaged
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-nova-23.2.3-17.1.20240614020750.2ace99d.el9ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-21 09:38:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Takashi Kajinami 2021-07-14 05:13:47 UTC
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:

Comment 4 Artom Lifshitz 2024-01-31 16:45:05 UTC
Make sure to cherry-pick https://review.opendev.org/c/openstack/nova/+/844753 to 17.1 once that lands on upstream wallaby.

Comment 16 errata-xmlrpc 2024-11-21 09:38:04 UTC
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