Merge "Refactor swift config services"
This commit is contained in:
commit
be80b67dc7
17
lib/swift
17
lib/swift
@ -251,7 +251,7 @@ function _config_swift_apache_wsgi {
|
||||
|
||||
# This function generates an object/container/account configuration
|
||||
# emulating 4 nodes on different ports
|
||||
function generate_swift_config {
|
||||
function generate_swift_config_services {
|
||||
local swift_node_config=$1
|
||||
local node_id=$2
|
||||
local bind_port=$3
|
||||
@ -286,6 +286,10 @@ function generate_swift_config {
|
||||
|
||||
iniuncomment ${swift_node_config} ${server_type}-replicator vm_test_mode
|
||||
iniset ${swift_node_config} ${server_type}-replicator vm_test_mode yes
|
||||
|
||||
# Using a sed and not iniset/iniuncomment because we want to a global
|
||||
# modification and make sure it works for new sections.
|
||||
sed -i -e "s,#[ ]*recon_cache_path .*,recon_cache_path = ${SWIFT_DATA_DIR}/cache," ${swift_node_config}
|
||||
}
|
||||
|
||||
|
||||
@ -436,23 +440,18 @@ EOF
|
||||
for node_number in ${SWIFT_REPLICAS_SEQ}; do
|
||||
local swift_node_config=${SWIFT_CONF_DIR}/object-server/${node_number}.conf
|
||||
cp ${SWIFT_DIR}/etc/object-server.conf-sample ${swift_node_config}
|
||||
generate_swift_config ${swift_node_config} ${node_number} $(( OBJECT_PORT_BASE + 10 * (node_number - 1) )) object
|
||||
generate_swift_config_services ${swift_node_config} ${node_number} $(( OBJECT_PORT_BASE + 10 * (node_number - 1) )) object
|
||||
iniset ${swift_node_config} filter:recon recon_cache_path ${SWIFT_DATA_DIR}/cache
|
||||
# Using a sed and not iniset/iniuncomment because we want to a global
|
||||
# modification and make sure it works for new sections.
|
||||
sed -i -e "s,#[ ]*recon_cache_path .*,recon_cache_path = ${SWIFT_DATA_DIR}/cache," ${swift_node_config}
|
||||
|
||||
swift_node_config=${SWIFT_CONF_DIR}/container-server/${node_number}.conf
|
||||
cp ${SWIFT_DIR}/etc/container-server.conf-sample ${swift_node_config}
|
||||
generate_swift_config ${swift_node_config} ${node_number} $(( CONTAINER_PORT_BASE + 10 * (node_number - 1) )) container
|
||||
generate_swift_config_services ${swift_node_config} ${node_number} $(( CONTAINER_PORT_BASE + 10 * (node_number - 1) )) container
|
||||
iniuncomment ${swift_node_config} app:container-server allow_versions
|
||||
iniset ${swift_node_config} app:container-server allow_versions "true"
|
||||
sed -i -e "s,#[ ]*recon_cache_path .*,recon_cache_path = ${SWIFT_DATA_DIR}/cache," ${swift_node_config}
|
||||
|
||||
swift_node_config=${SWIFT_CONF_DIR}/account-server/${node_number}.conf
|
||||
cp ${SWIFT_DIR}/etc/account-server.conf-sample ${swift_node_config}
|
||||
generate_swift_config ${swift_node_config} ${node_number} $(( ACCOUNT_PORT_BASE + 10 * (node_number - 1) )) account
|
||||
sed -i -e "s,#[ ]*recon_cache_path .*,recon_cache_path = ${SWIFT_DATA_DIR}/cache," ${swift_node_config}
|
||||
generate_swift_config_services ${swift_node_config} ${node_number} $(( ACCOUNT_PORT_BASE + 10 * (node_number - 1) )) account
|
||||
done
|
||||
|
||||
# Set new accounts in tempauth to match keystone tenant/user (to make testing easier)
|
||||
|
Loading…
Reference in New Issue
Block a user