From e0bb447244cebb86adde5617d67c8ba828f661fb Mon Sep 17 00:00:00 2001 From: Alan Pevec Date: Tue, 12 Mar 2013 11:10:52 +0100 Subject: [PATCH] Support for separate Keystone paste.deploy configuration Support for Keystone change https://review.openstack.org/24126 while keeping the backward compatiblity with mixed cfg/paste.deploy configuration file. Also remove insertion of s3 extension which was merged in https://github.com/openstack/keystone/commit/b2aa620bc9d040f803c49707237f43ff1a04ef93 Change-Id: Ib7e2913ebb507f882dcd71b1142bcdb4b040ae6b --- lib/keystone | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/keystone b/lib/keystone index 25803515f0..90bc108448 100644 --- a/lib/keystone +++ b/lib/keystone @@ -31,6 +31,7 @@ set +o xtrace KEYSTONE_DIR=$DEST/keystone KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone} KEYSTONE_CONF=$KEYSTONE_CONF_DIR/keystone.conf +KEYSTONE_PASTE_INI=${KEYSTONE_PASTE_INI:-$KEYSTONE_CONF_DIR/keystone-paste.ini} KEYSTONE_AUTH_CACHE_DIR=${KEYSTONE_AUTH_CACHE_DIR:-/var/cache/keystone} KEYSTONECLIENT_DIR=$DEST/python-keystoneclient @@ -88,6 +89,15 @@ function configure_keystone() { if [[ "$KEYSTONE_CONF_DIR" != "$KEYSTONE_DIR/etc" ]]; then cp -p $KEYSTONE_DIR/etc/keystone.conf.sample $KEYSTONE_CONF cp -p $KEYSTONE_DIR/etc/policy.json $KEYSTONE_CONF_DIR + if [[ -f "$KEYSTONE_DIR/etc/keystone-paste.ini" ]]; then + cp -p "$KEYSTONE_DIR/etc/keystone-paste.ini" "$KEYSTONE_PASTE_INI" + fi + fi + if [[ -f "$KEYSTONE_PASTE_INI" ]]; then + iniset "$KEYSTONE_CONF" paste_deploy config_file "$KEYSTONE_PASTE_INI" + else + # compatibility with mixed cfg and paste.deploy configuration + KEYSTONE_PASTE_INI="$KEYSTONE_CONF" fi # Rewrite stock ``keystone.conf`` @@ -125,12 +135,6 @@ function configure_keystone() { iniset $KEYSTONE_CONF signing token_format "$KEYSTONE_TOKEN_FORMAT" iniset $KEYSTONE_CONF sql connection $dburl iniset $KEYSTONE_CONF ec2 driver "keystone.contrib.ec2.backends.sql.Ec2" - sed -e " - /^pipeline.*ec2_extension crud_/s|ec2_extension crud_extension|ec2_extension s3_extension crud_extension|; - " -i $KEYSTONE_CONF - - # Append the S3 bits - iniset $KEYSTONE_CONF filter:s3_extension paste.filter_factory "keystone.contrib.s3:S3Extension.factory" if [[ "$KEYSTONE_TOKEN_BACKEND" = "sql" ]]; then iniset $KEYSTONE_CONF token driver keystone.token.backends.sql.Token