Recently it was added a patch to OSH that changed the way that
Nova creates the compute_id file for the Nova application [1].
This review adds an extra step to the patch, where if the file
already exists, it uses it instead of creating another one.
It also creates a pre stop hook to delete this file when the
pod is being deleted, so as to not leave garbage when deleting
the application from the system.
This change was necessary because the current logic was affecting
the application-update, causing the nova-compute pods to stay in
a crashloop state, so it not only failed the update but also the
recovery.
[1] - https://review.opendev.org/c/starlingx/openstack-armada-app/+/955218
Test Plan:
PASS - Build all packages and STX-O tarball
PASS - Application upload and apply
PASS - If compute_id file exists, nova uses it
PASS - If compute_id does not exists, the file is created
using the node UUID
PASS - Application update succesfull
PASS - Apllication running after compute node reinstall
(after a fresh apply*)
PASS - Application delete removes the compute_id file
* Node reinstall after an application update, will cause
the nova-compute of the node to remain in a failed state.
Closes-Bug: #2127790
Change-Id: I50bc20857293f4751e6ed7a211c6e8a1ca0145ce
Signed-off-by: Daniel Caires <DanielMarques.Caires@windriver.com>