Use keystoneauth middleware from swift.

- We have moved swift to keystone middleware to swift use it.
- Should be referenced now as keystoneauth.
- Make swift-init silently pass in unstack even when swift was not yet
  installed.

Change-Id: Ibf9443608b7aa81be5f48f555e95ff5f4c8065bd
This commit is contained in:
Chmouel Boudjnah 2012-08-06 10:07:43 +00:00
parent c42922090b
commit 84394b9f8f
2 changed files with 14 additions and 17 deletions

View File

@ -1510,7 +1510,7 @@ if is_service_enabled swift; then
# which has some default username and password if you have # which has some default username and password if you have
# configured keystone it will checkout the directory. # configured keystone it will checkout the directory.
if is_service_enabled key; then if is_service_enabled key; then
swift_auth_server+="authtoken keystone" swift_auth_server+="authtoken keystoneauth"
else else
swift_auth_server=tempauth swift_auth_server=tempauth
fi fi
@ -1540,23 +1540,20 @@ if is_service_enabled swift; then
iniset ${SWIFT_CONFIG_PROXY_SERVER} app:proxy-server account_autocreate true iniset ${SWIFT_CONFIG_PROXY_SERVER} app:proxy-server account_autocreate true
cat <<EOF>>${SWIFT_CONFIG_PROXY_SERVER} # Configure Keystone
sed -i '/^# \[filter:authtoken\]/,/^# \[filter:keystoneauth\]$/ s/^#[ \t]*//' ${SWIFT_CONFIG_PROXY_SERVER}
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken auth_host $KEYSTONE_AUTH_HOST
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken auth_port $KEYSTONE_AUTH_PORT
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken auth_protocol $KEYSTONE_AUTH_PROTOCOL
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken admin_tenant_name $SERVICE_TENANT_NAME
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken admin_user swift
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken admin_password $SERVICE_PASSWORD
[filter:keystone] iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:keystoneauth use
paste.filter_factory = keystone.middleware.swift_auth:filter_factory iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:keystoneauth operator_roles
operator_roles = Member,admin iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:keystoneauth operator_roles "Member, admin"
[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
auth_host = ${KEYSTONE_AUTH_HOST}
auth_port = ${KEYSTONE_AUTH_PORT}
auth_protocol = ${KEYSTONE_AUTH_PROTOCOL}
auth_uri = ${KEYSTONE_SERVICE_PROTOCOL}://${KEYSTONE_SERVICE_HOST}:${KEYSTONE_SERVICE_PORT}/
admin_tenant_name = ${SERVICE_TENANT_NAME}
admin_user = swift
admin_password = ${SERVICE_PASSWORD}
delay_auth_decision = 1
EOF
if is_service_enabled swift3;then if is_service_enabled swift3;then
cat <<EOF>>${SWIFT_CONFIG_PROXY_SERVER} cat <<EOF>>${SWIFT_CONFIG_PROXY_SERVER}
# NOTE(chmou): s3token middleware is not updated yet to use only # NOTE(chmou): s3token middleware is not updated yet to use only

View File

@ -37,7 +37,7 @@ fi
# Swift runs daemons # Swift runs daemons
if is_service_enabled swift; then if is_service_enabled swift; then
swift-init all stop swift-init all stop 2>/dev/null || true
fi fi
# Apache has the WSGI processes # Apache has the WSGI processes