Prevent protected node tests from orphaning test nodes
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.
Change-Id: I4dc6140f1dbcf1bb891fa522523957c1d8002df4
2 files changed