Bug 2177274

Summary: Prevent ironic protected node tests from orphaning test nodes
Product: Red Hat OpenStack Reporter: Jason Paroly <jparoly>
Component: python-ironic-tests-tempestAssignee: Jason Paroly <jparoly>
Status: CLOSED ERRATA QA Contact: Martin Kopec <mkopec>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.2 (Train)CC: jschluet, mariel, mkopec, sbaker
Target Milestone: z6Keywords: Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ironic-tests-tempest-2.3.0-2.20220709024918.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 19:18:31 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 Jason Paroly 2023-03-10 16:47:11 UTC
Description of problem:

While investigating failures where four orphaned nodes
were observed after running the tempest plugin against an
operating environment, it was discovered that each node
was created by the TestProtectedNode class. A review of the
logs indicated that tearDown() was being called, but
resource_cleanup was never being called which houses the
unified resource cleanup. Upon reviewing the pattern
in tempest itself, generally resource_cleanup is used
instead of teardown, however with our class structure,
that doesn't seem to work, so instead we just
explicitly call to unset the protected state for each
node.

We should now be consistent, and the four TestProtectedNode
tests should no longer orphan four nodes when run.

Also added some additional logging to help spotting cases
where orphaned nodes might be occuring, in order to aid
in troubleshooting when reviewing Tempest logs.


We need this for 16.1 and 16.2

Fix needing backport:
https://review.opendev.org/c/openstack/ironic-tempest-plugin/+/871301

Comment 7 Martin Kopec 2023-09-27 08:17:46 UTC
The Fixed in version package contains the required fix. The package is also available in the latest puddle.

Comment 12 errata-xmlrpc 2023-11-08 19:18:31 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 (Red Hat OpenStack Platform 16.2.6 (Train) 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-2023:6307