From d5651bb5c6fe3e51849742527aae77dadf826cb4 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Tue, 1 Nov 2011 16:22:08 +0100 Subject: [PATCH] More fixes (this is now working). --- files/swift-proxy-server.conf | 1 + files/swift-startmain | 2 +- stack.sh | 14 +++++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) mode change 100644 => 100755 files/swift-startmain diff --git a/files/swift-proxy-server.conf b/files/swift-proxy-server.conf index 9e2b1dd..737a66d 100644 --- a/files/swift-proxy-server.conf +++ b/files/swift-proxy-server.conf @@ -9,6 +9,7 @@ pipeline = healthcheck cache tempauth proxy-server [app:proxy-server] use = egg:swift#proxy allow_account_management = true +account_autocreate = true [filter:tempauth] use = egg:swift#tempauth diff --git a/files/swift-startmain b/files/swift-startmain old mode 100644 new mode 100755 index 05b9509..69efebd --- a/files/swift-startmain +++ b/files/swift-startmain @@ -1,3 +1,3 @@ #!/bin/bash -swift-init all start +swift-init all restart diff --git a/stack.sh b/stack.sh index 4c93e67..5cb5a18 100755 --- a/stack.sh +++ b/stack.sh @@ -641,7 +641,7 @@ EOF sed -e "s/%SWIFT_LOCATION%/$SWIFT_LOCATION/" $FILES/swift-rsyncd.conf | sudo tee /etc/rsyncd.conf # Copy proxy-server configuration - cp $FILES/swift-proxy-server.conf /etc/swift/ + cp $FILES/swift-proxy-server.conf /etc/swift/proxy-server.conf # Generate swift.conf, we need to have the swift-hash being random # and unique. @@ -656,8 +656,8 @@ EOF local bind_port=$2 local log_facility=$3 for node_number in {1..4};do - node_path=${SWIFT_LOCATION}/${node_number}/node - sed -e "s/%NODE_PATH%/${node_path}/;s/%BIND_PORT%/${bind_port}/;s/%LOG_FACILITY%/${log_facility}/" \ + node_path=${SWIFT_LOCATION}/${node_number} + sed -e "s,%NODE_PATH%,${node_path},;s,%BIND_PORT%,${bind_port},;s,%LOG_FACILITY%,${log_facility}," \ $FILES/swift-${server_type}-server.conf > /etc/swift/${server_type}-server/${node_number}.conf bind_port=$(( ${bind_port} + 10 )) log_facility=$(( ${log_facility} + 1 )) @@ -673,6 +673,14 @@ EOF sudo install -m755 $FILES/swift-startmain /usr/local/bin/ sudo chmod +x /usr/local/bin/swift-* + # Create ring + /usr/local/bin/swift-remakerings + + # Start everything + /usr/local/bin/swift-startmain || : + + # This should work (tempauth) + # swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing stat unset s swift_hasH fi