Revert "Enable swift by default."
This reverts commit 5a5cbf7274a6a50bb766ec590cf885430ed5c5d0.
This breaks on a default openstack install on Ubuntu 12.10,
revert for now until this can be cleaned up to work out of the
box.
Change-Id: I185509cc30bd28e920cdab60fc92129949bd6b0d
diff --git a/lib/keystone b/lib/keystone
index eea2c4d..2580351 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -146,7 +146,7 @@
cp -p $FILES/default_catalog.templates $KEYSTONE_CATALOG
# Add swift endpoints to service catalog if swift is enabled
- if is_service_enabled s-proxy; then
+ if is_service_enabled swift; then
echo "catalog.RegionOne.object_store.publicURL = http://%SERVICE_HOST%:8080/v1/AUTH_\$(tenant_id)s" >> $KEYSTONE_CATALOG
echo "catalog.RegionOne.object_store.adminURL = http://%SERVICE_HOST%:8080/" >> $KEYSTONE_CATALOG
echo "catalog.RegionOne.object_store.internalURL = http://%SERVICE_HOST%:8080/v1/AUTH_\$(tenant_id)s" >> $KEYSTONE_CATALOG
diff --git a/lib/swift b/lib/swift
index 326c6f3..5ba7e56 100644
--- a/lib/swift
+++ b/lib/swift
@@ -56,11 +56,10 @@
SWIFT_PARTITION_POWER_SIZE=${SWIFT_PARTITION_POWER_SIZE:-9}
# Set ``SWIFT_REPLICAS`` to configure how many replicas are to be
-# configured for your Swift cluster. By default we are configuring
-# only one replica since this is way less CPU and memory intensive. If
-# you are planning to test swift replication you may want to set this
-# up to 3.
-SWIFT_REPLICAS=${SWIFT_REPLICAS:-1}
+# configured for your Swift cluster. By default the three replicas would need a
+# bit of IO and Memory on a VM you may want to lower that to 1 if you want to do
+# only some quick testing.
+SWIFT_REPLICAS=${SWIFT_REPLICAS:-3}
SWIFT_REPLICAS_SEQ=$(seq ${SWIFT_REPLICAS})
# Set ``OBJECT_PORT_BASE``, ``CONTAINER_PORT_BASE``, ``ACCOUNT_PORT_BASE``
@@ -360,26 +359,13 @@
sudo systemctl start xinetd.service
fi
- # By default with only one replica we are launching the proxy,
- # container, account and object server in screen in foreground and
- # other services in background. If we have SWIFT_REPLICAS set to something
- # greater than one we first spawn all the swift services then kill the proxy
- # service so we can run it in foreground in screen. ``swift-init ...
- # {stop|restart}`` exits with '1' if no servers are running, ignore it just
- # in case
+ # First spawn all the swift services then kill the
+ # proxy service so we can run it in foreground in screen.
+ # ``swift-init ... {stop|restart}`` exits with '1' if no servers are running,
+ # ignore it just in case
swift-init --run-dir=${SWIFT_DATA_DIR}/run all restart || true
- if [[ ${SWIFT_REPLICAS} == 1 ]];then
- todo="object container account"
- fi
- for type in proxy ${todo};do
- swift-init --run-dir=${SWIFT_DATA_DIR}/run ${type} stop || true
- done
- screen_it s-proxy "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONFIG_DIR}/proxy-server.conf -v"
- if [[ ${SWIFT_REPLICAS} == 1 ]];then
- for type in object container account;do
- screen_it s-${type} "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-${type}-server ${SWIFT_CONFIG_DIR}/${type}-server/1.conf -v"
- done
- fi
+ swift-init --run-dir=${SWIFT_DATA_DIR}/run proxy stop || true
+ screen_it swift "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONFIG_DIR}/proxy-server.conf -v"
}
# stop_swift() - Stop running processes (non-screen)