Merge "Allow passing extra parameters to keystone-manage in extend_start"

This commit is contained in:
Zuul 2017-11-02 10:34:04 +00:00 committed by Gerrit Code Review
commit 93b91ceef6
1 changed files with 5 additions and 4 deletions

View File

@ -39,14 +39,15 @@ if [[ $(stat -c %a ${KEYSTONE_LOG_DIR}) != "755" ]]; then
chmod 755 ${KEYSTONE_LOG_DIR}
fi
EXTRA_KEYSTONE_MANAGE_ARGS=${EXTRA_KEYSTONE_MANAGE_ARGS-}
# Upgrade and exit if KOLLA_UPGRADE variable is set. This catches all cases
# of the KOLLA_UPGRADE variable being set, including empty.
if [[ "${!KOLLA_UPGRADE[@]}" ]]; then
# TODO(duonghq): check doctor result here
# TODO: find reason why doctor failed in gate
# sudo -H -u keystone keystone-manage doctor
sudo -H -u keystone keystone-manage db_sync --expand
sudo -H -u keystone keystone-manage db_sync --migrate
sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync --expand
sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync --migrate
exit 0
fi
@ -54,14 +55,14 @@ fi
# This catches all cases of the KOLLA_FINISH_UPGRADE variable being set,
# including empty.
if [[ "${!KOLLA_FINISH_UPGRADE[@]}" ]]; then
sudo -H -u keystone keystone-manage db_sync --contract
sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync --contract
exit 0
fi
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
sudo -H -u keystone keystone-manage db_sync
sudo -H -u keystone keystone-manage ${EXTRA_KEYSTONE_MANAGE_ARGS} db_sync
exit 0
fi