summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>2017-10-31 07:58:35 +0200
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>2017-10-31 09:12:23 +0000
commitdefa2808e709fc50ebdeb99802028731963eb376 (patch)
treeebf27bd31efebbe534c201f61e910534519f4e01 /docker
parent568f131ab6be29b8814ce802535ccceea4e2fd6b (diff)
downloadkolla-defa2808e709fc50ebdeb99802028731963eb376.tar.gz
kolla-defa2808e709fc50ebdeb99802028731963eb376.zip
Allow passing extra parameters to keystone-manage in extend_start
This allows deployers to pass arbitrary parameters to the kesytone-manage commands. Which can be useful to pass the keystone log dir and file as an empty environment variable, which, in turn, will allow us to make the db sync command to log to stdout instead of the file. Change-Id: Id9e8c641a6b00725d2f5c9623b05854a1b4e2af2
Diffstat (limited to 'docker')
-rw-r--r--docker/keystone/keystone/extend_start.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/docker/keystone/keystone/extend_start.sh b/docker/keystone/keystone/extend_start.sh
index cd8a75635..8802dd9d5 100644
--- a/docker/keystone/keystone/extend_start.sh
+++ b/docker/keystone/keystone/extend_start.sh
@@ -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