aboutsummaryrefslogtreecommitdiff
path: root/docker/common/swift/swift-container-server
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-08-07 17:28:16 +0000
committerSam Yaple <sam@yaple.net>2015-08-07 17:48:46 +0000
commit5f16da8aa5f493acb890ba8acfe6d5e0d4d80dec (patch)
tree9e298c90e340ee6fadfe9eb0bb85b25129b3b697 /docker/common/swift/swift-container-server
parenta5e907a8e91bc4e1d8f563dc79db0ee96c15d380 (diff)
downloadkolla-5f16da8aa5f493acb890ba8acfe6d5e0d4d80dec.tar.gz
kolla-5f16da8aa5f493acb890ba8acfe6d5e0d4d80dec.zip
Remove config-internal for swift
Change-Id: I07e105a5638ad9fde67e58bf371dffda64563a53 Partially-Implements: blueprint remove-config-internal
Diffstat (limited to 'docker/common/swift/swift-container-server')
-rwxr-xr-xdocker/common/swift/swift-container-server/config-internal.sh52
-rwxr-xr-xdocker/common/swift/swift-container-server/start.sh2
2 files changed, 1 insertions, 53 deletions
diff --git a/docker/common/swift/swift-container-server/config-internal.sh b/docker/common/swift/swift-container-server/config-internal.sh
deleted file mode 100755
index 5404baea2..000000000
--- a/docker/common/swift/swift-container-server/config-internal.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-
-set -e
-
-CMD="/usr/bin/swift-container-server"
-ARGS="/etc/swift/container-server.conf --verbose"
-
-. /opt/kolla/config-swift.sh
-
-check_required_vars \
- SWIFT_CONTAINER_SVC_BIND_IP \
- SWIFT_CONTAINER_SVC_BIND_PORT \
- SWIFT_CONTAINER_SVC_DEVICES \
- SWIFT_CONTAINER_SVC_MOUNT_CHECK \
- SWIFT_CONTAINER_SVC_RING_DEVICES \
- SWIFT_CONTAINER_SVC_RING_HOSTS \
- SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS \
- SWIFT_CONTAINER_SVC_RING_NAME \
- SWIFT_CONTAINER_SVC_RING_PART_POWER \
- SWIFT_CONTAINER_SVC_RING_REPLICAS \
- SWIFT_CONTAINER_SVC_RING_WEIGHTS \
- SWIFT_CONTAINER_SVC_RING_ZONES \
- SWIFT_DIR \
- SWIFT_USER
-
-cfg=/etc/swift/container-server.conf
-
-# [DEFAULT]
-crudini --set $cfg DEFAULT bind_ip "${SWIFT_CONTAINER_SVC_BIND_IP}"
-crudini --set $cfg DEFAULT bind_port "${SWIFT_CONTAINER_SVC_BIND_PORT}"
-crudini --set $cfg DEFAULT user "${SWIFT_USER}"
-crudini --set $cfg DEFAULT swift_dir "${SWIFT_DIR}"
-crudini --set $cfg DEFAULT devices "${SWIFT_CONTAINER_SVC_DEVICES}"
-crudini --set $cfg DEFAULT mount_check "${SWIFT_CONTAINER_SVC_MOUNT_CHECK}"
-
-# Create swift user and group if they don't exist
-id -u swift &>/dev/null || useradd --user-group swift
-
-# Ensure proper ownership of the mount point directory structure
-chown -R swift:swift /srv/node
-
-python /opt/kolla/build-swift-ring.py \
- -f ${SWIFT_CONTAINER_SVC_RING_NAME} \
- -p ${SWIFT_CONTAINER_SVC_RING_PART_POWER} \
- -r ${SWIFT_CONTAINER_SVC_RING_REPLICAS} \
- -m ${SWIFT_CONTAINER_SVC_RING_MIN_PART_HOURS} \
- -H ${SWIFT_CONTAINER_SVC_RING_HOSTS} \
- -w ${SWIFT_CONTAINER_SVC_RING_WEIGHTS} \
- -d ${SWIFT_CONTAINER_SVC_RING_DEVICES} \
- -z ${SWIFT_CONTAINER_SVC_RING_ZONES}
-
-exec $CMD $ARGS
diff --git a/docker/common/swift/swift-container-server/start.sh b/docker/common/swift/swift-container-server/start.sh
index 40ec93960..2c8977d50 100755
--- a/docker/common/swift/swift-container-server/start.sh
+++ b/docker/common/swift/swift-container-server/start.sh
@@ -8,7 +8,7 @@ ARGS="/etc/swift/container-server.conf --verbose"
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Config-internal script exec out of this function, it does not return here.
+# Execute config strategy
set_configs
exec $CMD $ARGS