diff options
author | Julia Kreger <juliaashleykreger@gmail.com> | 2021-06-08 07:57:48 -0700 |
---|---|---|
committer | Julia Kreger <juliaashleykreger@gmail.com> | 2021-06-10 07:04:15 -0700 |
commit | f58cbf1514035af24e37d0d5dcf9e3b5cf88a6d3 (patch) | |
tree | c51ed9771738ccf433304cf0ae01033390f3003f /devstack | |
parent | caa4c8fd2964cd0c75025705497b7040c973dbe0 (diff) | |
download | ironic-f58cbf1514035af24e37d0d5dcf9e3b5cf88a6d3.tar.gz |
Fix ironic-status db index check
When I merged the db status check in for database indexes, I missed
the most improtant line, which is where the object is populated with
the method name to be executed by the upgrade checks framework.
In the rush to try and clean-up after the impact of the Secure RBAC
work, I just didn't manually test the final file I uploaded into
review. I assumed it just worked because the job passed, but didn't
think about the resulting return codes which we *should* experience
on an upgrade from a prior version. Later on, I noticed that because
of the way the status checks are invoked, I also added the code to
do the index check in the wrong order, so I had to restructure things
so the method definition was known by the object on the class which
holds the method names list.
I guess I copied/pasted this over from another file I was testing
in just didn't run the final file. :( Funny enough, the index check
works like a charm now.
Also updates the status check invocation check in the upgrade script
for grenade, *as* warnings *are* permissible and not fatal.
Change-Id: Ifa9da65dc8df5bf9a369d6faeab310386dfd944a
Diffstat (limited to 'devstack')
-rwxr-xr-x | devstack/upgrade/upgrade.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh index 5e70ee431..8c6096da8 100755 --- a/devstack/upgrade/upgrade.sh +++ b/devstack/upgrade/upgrade.sh @@ -74,7 +74,15 @@ upgrade_project ironic $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH # NOTE(rloo): make sure it is OK to do an upgrade. Except that we aren't # parsing/checking the output of this command because the output could change # based on the checks it makes. -$IRONIC_BIN_DIR/ironic-status upgrade check +$IRONIC_BIN_DIR/ironic-status upgrade check && ret_val=$? || ret_val=$? +if [ $ret_val -gt 1 ] ; then + # NOTE(TheJulia): We need to evaluate the return code from the + # upgrade status check as the framework defines + # Warnings are permissible and returned as status code 1, errors are + # returned as greater than 1 which means there is a major upgrade + # stopping issue which needs to be addressed. + die $LINENO "Ironic DB Status check failed, returned: $ret_val" +fi $IRONIC_BIN_DIR/ironic-dbsync --config-file=$IRONIC_CONF_FILE |