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:
parent
1fbf57832e
commit
bbcc1a5d22
@ -94,23 +94,19 @@ $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
|
# The nova-status upgrade check has the following return codes:
|
||||||
# so check to make sure it exists before attempting to run it.
|
# 0: Success - everything is good to go.
|
||||||
if [[ -x $(which nova-status) ]]; then
|
# 1: Warning - there is nothing blocking, but some issues were identified
|
||||||
# The nova-status upgrade check has the following return codes:
|
# 2: Failure - something is definitely wrong and the upgrade will fail
|
||||||
# 0: Success - everything is good to go.
|
# 255: Some kind of unexpected error occurred.
|
||||||
# 1: Warning - there is nothing blocking, but some issues were identified
|
# The funky || here is to allow us to trap the exit code and not fail the
|
||||||
# 2: Failure - something is definitely wrong and the upgrade will fail
|
# entire run if the return code is non-zero.
|
||||||
# 255: Some kind of unexpected error occurred.
|
$NOVA_BIN_DIR/nova-status upgrade check || {
|
||||||
# The funky || here is to allow us to trap the exit code and not fail the
|
rc=$?
|
||||||
# entire run if the return code is non-zero.
|
if [[ $rc -ge 2 ]]; then
|
||||||
nova-status upgrade check || {
|
echo "nova-status upgrade check has failed."
|
||||||
rc=$?
|
fi
|
||||||
if [[ $rc -ge 2 ]]; then
|
}
|
||||||
echo "nova-status upgrade check has failed."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start Nova
|
# Start Nova
|
||||||
start_nova_api
|
start_nova_api
|
||||||
|
Loading…
x
Reference in New Issue
Block a user