Fall back to keystone-manage if pt-archiver isn't available
It may have problems but using keystone-manage is better then having the token table grow indefinitely. Change-Id: Ie34874783c90afd7029378d4f473f336c8937c26 Fixes-bug: #1291426
This commit is contained in:
parent
5cbaf1856a
commit
e8e4d500f9
@ -4,8 +4,9 @@ set -eu
|
||||
KEYSTONE_DB=$(os-apply-config --key keystone.db --type dsn)
|
||||
|
||||
KEYSTONE_DB_TYPE=${KEYSTONE_DB%%://*}
|
||||
if [ "$KEYSTONE_DB_TYPE" != "mysql" ] ; then
|
||||
# We can just call this directly if bug #1188378 is ever fixed
|
||||
# Use keystone-manage if not mysql or pt-archiver isn't available
|
||||
# We can just call this directly if bug #1188378 is ever fixed
|
||||
if [ "$KEYSTONE_DB_TYPE" != "mysql" ] || ! which pt-archiver 2> /dev/null ; then
|
||||
exec keystone-manage token_flush
|
||||
fi
|
||||
|
||||
|
@ -13,6 +13,10 @@ ln -s $KEYSTONE_VENV_DIR/bin/keystone-manage /usr/local/bin/keystone-manage
|
||||
cp /opt/stack/keystone/etc/policy.json /etc/keystone/policy.json
|
||||
cp /opt/stack/keystone/etc/keystone-paste.ini /etc/keystone/keystone-paste.ini
|
||||
|
||||
# Install scripts to clean up tokens
|
||||
install -m 0755 -o root -g root $(dirname $0)/../cleanup-keystone-tokens.sh /usr/local/bin
|
||||
install -m 0640 -o root -g root $(dirname $0)/../keystone.crontab /etc/cron.d/keystone
|
||||
|
||||
# percona-tookit is NOT supported on Fedora (retrieved 25-06-2013)
|
||||
# http://www.percona.com/mysql-support/policies/percona-toolkit-supported-platforms-and-versions
|
||||
if [[ "Ubuntu RedHatEnterpriseServer CentOS" =~ "$DISTRO" ]]; then
|
||||
@ -20,6 +24,4 @@ if [[ "Ubuntu RedHatEnterpriseServer CentOS" =~ "$DISTRO" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
install-packages percona-toolkit
|
||||
install -m 0755 -o root -g root $(dirname $0)/../cleanup-keystone-tokens.sh /usr/local/bin
|
||||
install -m 0640 -o root -g root $(dirname $0)/../keystone.crontab /etc/cron.d/keystone
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user