Revert "Revert "Swift: configure Ceilometer when it is enabled""
Commit6650fda680
is no longer needed: https://review.openstack.org/#/c/46048 has been merged. This reverts commit6650fda680
. Change-Id: I47d28a292667eb8ece2061c0ef19c7c925e5747c
This commit is contained in:
parent
4c2870b64a
commit
d9883407e9
11
lib/swift
11
lib/swift
@ -67,6 +67,10 @@ SWIFT_LOOPBACK_DISK_SIZE=${SWIFT_LOOPBACK_DISK_SIZE:-$SWIFT_LOOPBACK_DISK_SIZE_D
|
|||||||
# Default is ``staticweb, tempurl, formpost``
|
# Default is ``staticweb, tempurl, formpost``
|
||||||
SWIFT_EXTRAS_MIDDLEWARE=${SWIFT_EXTRAS_MIDDLEWARE:-tempurl formpost staticweb}
|
SWIFT_EXTRAS_MIDDLEWARE=${SWIFT_EXTRAS_MIDDLEWARE:-tempurl formpost staticweb}
|
||||||
|
|
||||||
|
# Set ``SWIFT_EXTRAS_MIDDLEWARE_LAST`` to extras middlewares that need to be at
|
||||||
|
# the end of the pipeline.
|
||||||
|
SWIFT_EXTRAS_MIDDLEWARE_LAST=${SWIFT_EXTRAS_MIDDLEWARE_LAST}
|
||||||
|
|
||||||
# The ring uses a configurable number of bits from a path’s MD5 hash as
|
# The ring uses a configurable number of bits from a path’s MD5 hash as
|
||||||
# a partition index that designates a device. The number of bits kept
|
# a partition index that designates a device. The number of bits kept
|
||||||
# from the hash is known as the partition power, and 2 to the partition
|
# from the hash is known as the partition power, and 2 to the partition
|
||||||
@ -255,6 +259,12 @@ function configure_swift() {
|
|||||||
iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} DEFAULT bind_port
|
iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} DEFAULT bind_port
|
||||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} DEFAULT bind_port ${SWIFT_DEFAULT_BIND_PORT:-8080}
|
iniset ${SWIFT_CONFIG_PROXY_SERVER} DEFAULT bind_port ${SWIFT_DEFAULT_BIND_PORT:-8080}
|
||||||
|
|
||||||
|
# Configure Ceilometer
|
||||||
|
if is_service_enabled ceilometer; then
|
||||||
|
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:ceilometer use "egg:ceilometer#swift"
|
||||||
|
SWIFT_EXTRAS_MIDDLEWARE_LAST="${SWIFT_EXTRAS_MIDDLEWARE_LAST} ceilometer"
|
||||||
|
fi
|
||||||
|
|
||||||
# By default Swift will be installed with keystone and tempauth middleware
|
# By default Swift will be installed with keystone and tempauth middleware
|
||||||
# and add the swift3 middleware if its configured for it. The token for
|
# and add the swift3 middleware if its configured for it. The token for
|
||||||
# tempauth would be prefixed with the reseller_prefix setting TEMPAUTH_ the
|
# tempauth would be prefixed with the reseller_prefix setting TEMPAUTH_ the
|
||||||
@ -264,6 +274,7 @@ function configure_swift() {
|
|||||||
fi
|
fi
|
||||||
swift_pipeline+=" authtoken keystoneauth tempauth "
|
swift_pipeline+=" authtoken keystoneauth tempauth "
|
||||||
sed -i "/^pipeline/ { s/tempauth/${swift_pipeline} ${SWIFT_EXTRAS_MIDDLEWARE}/ ;}" ${SWIFT_CONFIG_PROXY_SERVER}
|
sed -i "/^pipeline/ { s/tempauth/${swift_pipeline} ${SWIFT_EXTRAS_MIDDLEWARE}/ ;}" ${SWIFT_CONFIG_PROXY_SERVER}
|
||||||
|
sed -i "/^pipeline/ { s/proxy-server/${SWIFT_EXTRAS_MIDDLEWARE_LAST} proxy-server/ ; }" ${SWIFT_CONFIG_PROXY_SERVER}
|
||||||
|
|
||||||
iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth account_autocreate
|
iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth account_autocreate
|
||||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} app:proxy-server account_autocreate true
|
iniset ${SWIFT_CONFIG_PROXY_SERVER} app:proxy-server account_autocreate true
|
||||||
|
Loading…
Reference in New Issue
Block a user