From ca8a591f749f0435714d55cd0109940421be626d Mon Sep 17 00:00:00 2001 From: Eamonn O'Toole Date: Wed, 23 Jul 2014 16:51:15 +0100 Subject: [PATCH] Allow operator to disable Swift ring building. The default method for updating Swift rings - such as adding new nodes to existing rings - is to do the update manually and then distribute the new rings to all Swift nodes. At the moment Heat builds rings by default when a Swift node is brought up. We do not want this to happen when Heat is being used to bring up new Swift nodes for inclusion in an existing overcloud Swift cluster. This patch checks for a piece of meta-data swift.ring-build, which defaults to True. If instead the metadata is set to False or F then Swift rings will not be built. The metadata can be set to False or F by an operator at the heat command-line, in particular at heat update to an existing overcloud stack. Change-Id: Ia2544d560b20d895b3b0b19bc7c91542ad58509d --- elements/swift/os-refresh-config/configure.d/73-swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/elements/swift/os-refresh-config/configure.d/73-swift b/elements/swift/os-refresh-config/configure.d/73-swift index 9b74c2794..abd9d2d4a 100755 --- a/elements/swift/os-refresh-config/configure.d/73-swift +++ b/elements/swift/os-refresh-config/configure.d/73-swift @@ -7,6 +7,12 @@ PARTPOWER=$(os-apply-config --key swift.part-power --key-default 10) REPLICAS=$(os-apply-config --key swift.replicas --key-default 1) DEVICES=$(os-apply-config --key swift.devices --key-default "" --type raw) ZONES=$(os-apply-config --key swift.zones --key-default 1) +BUILD_RINGS=$(os-apply-config --key swift.ring-build --key-default "True" | tr '[:upper:]' '[:lower:]') + +if [ "$BUILD_RINGS" == "false" ] || [ "$BUILD_RINGS" == "f" ]; then + echo "Won't build rings" + exit 0 +fi get_bind_port () { # first argument is the config file path