Run nova-status upgrade always

nova-status was not there before Ocata due to that we
had condition to check if nova-status exist or not. As
Ocata and older releases are EOL, we should not have that
command exist check. The check can give false result when
nova-status does not exist due to any reason and in that
case greande will not fail.

Change-Id: I465d4159f04775890bfb0da20cd14c5e1de19cc4
This commit is contained in:
Ghanshyam Mann 2024-10-18 19:36:09 -07:00
parent 1fbf57832e
commit bbcc1a5d22

View File

@ -94,9 +94,6 @@ $NOVA_BIN_DIR/nova-manage cell_v2 simple_cell_setup --transport-url $(get_transp
# the placement endpoint. # the placement endpoint.
ensure_services_started placement-api ensure_services_started placement-api
# Run the nova-status upgrade check, which was only available starting in Ocata
# so check to make sure it exists before attempting to run it.
if [[ -x $(which nova-status) ]]; then
# The nova-status upgrade check has the following return codes: # The nova-status upgrade check has the following return codes:
# 0: Success - everything is good to go. # 0: Success - everything is good to go.
# 1: Warning - there is nothing blocking, but some issues were identified # 1: Warning - there is nothing blocking, but some issues were identified
@ -104,13 +101,12 @@ if [[ -x $(which nova-status) ]]; then
# 255: Some kind of unexpected error occurred. # 255: Some kind of unexpected error occurred.
# The funky || here is to allow us to trap the exit code and not fail the # The funky || here is to allow us to trap the exit code and not fail the
# entire run if the return code is non-zero. # entire run if the return code is non-zero.
nova-status upgrade check || { $NOVA_BIN_DIR/nova-status upgrade check || {
rc=$? rc=$?
if [[ $rc -ge 2 ]]; then if [[ $rc -ge 2 ]]; then
echo "nova-status upgrade check has failed." echo "nova-status upgrade check has failed."
fi fi
} }
fi
# Start Nova # Start Nova
start_nova_api start_nova_api