From bbcc1a5d2202f7ced5698b03fc789d4b34dbe8bf Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Fri, 18 Oct 2024 19:36:09 -0700 Subject: [PATCH] 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 --- projects/60_nova/upgrade.sh | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/projects/60_nova/upgrade.sh b/projects/60_nova/upgrade.sh index 6dc7498d..a232d46e 100755 --- a/projects/60_nova/upgrade.sh +++ b/projects/60_nova/upgrade.sh @@ -94,23 +94,19 @@ $NOVA_BIN_DIR/nova-manage cell_v2 simple_cell_setup --transport-url $(get_transp # the placement endpoint. 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: - # 0: Success - everything is good to go. - # 1: Warning - there is nothing blocking, but some issues were identified - # 2: Failure - something is definitely wrong and the upgrade will fail - # 255: Some kind of unexpected error occurred. - # 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. - nova-status upgrade check || { - rc=$? - if [[ $rc -ge 2 ]]; then - echo "nova-status upgrade check has failed." - fi - } -fi +# The nova-status upgrade check has the following return codes: +# 0: Success - everything is good to go. +# 1: Warning - there is nothing blocking, but some issues were identified +# 2: Failure - something is definitely wrong and the upgrade will fail +# 255: Some kind of unexpected error occurred. +# 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. +$NOVA_BIN_DIR/nova-status upgrade check || { + rc=$? + if [[ $rc -ge 2 ]]; then + echo "nova-status upgrade check has failed." + fi +} # Start Nova start_nova_api