Browse code

More fixes (this is now working).

Chmouel Boudjnah authored on 2011/11/02 00:22:08
Showing 3 changed files
... ...
@@ -9,6 +9,7 @@ pipeline = healthcheck cache tempauth proxy-server
9 9
 [app:proxy-server]
10 10
 use = egg:swift#proxy
11 11
 allow_account_management = true
12
+account_autocreate = true
12 13
 
13 14
 [filter:tempauth]
14 15
 use = egg:swift#tempauth
15 16
old mode 100644
16 17
new mode 100755
... ...
@@ -1,3 +1,3 @@
1 1
 #!/bin/bash
2 2
 
3
-swift-init all start
3
+swift-init all restart
... ...
@@ -641,7 +641,7 @@ EOF
641 641
    sed -e "s/%SWIFT_LOCATION%/$SWIFT_LOCATION/" $FILES/swift-rsyncd.conf | sudo tee /etc/rsyncd.conf
642 642
 
643 643
    # Copy proxy-server configuration
644
-   cp $FILES/swift-proxy-server.conf /etc/swift/
644
+   cp $FILES/swift-proxy-server.conf /etc/swift/proxy-server.conf
645 645
 
646 646
    # Generate swift.conf, we need to have the swift-hash being random
647 647
    # and unique.
... ...
@@ -656,8 +656,8 @@ EOF
656 656
        local bind_port=$2
657 657
        local log_facility=$3
658 658
        for node_number in {1..4};do
659
-           node_path=${SWIFT_LOCATION}/${node_number}/node
660
-           sed -e "s/%NODE_PATH%/${node_path}/;s/%BIND_PORT%/${bind_port}/;s/%LOG_FACILITY%/${log_facility}/" \
659
+           node_path=${SWIFT_LOCATION}/${node_number}
660
+           sed -e "s,%NODE_PATH%,${node_path},;s,%BIND_PORT%,${bind_port},;s,%LOG_FACILITY%,${log_facility}," \
661 661
                $FILES/swift-${server_type}-server.conf > /etc/swift/${server_type}-server/${node_number}.conf
662 662
            bind_port=$(( ${bind_port} + 10 ))
663 663
            log_facility=$(( ${log_facility} + 1 ))
... ...
@@ -673,6 +673,14 @@ EOF
673 673
    sudo install -m755 $FILES/swift-startmain /usr/local/bin/
674 674
    sudo chmod +x /usr/local/bin/swift-*
675 675
 
676
+   # Create ring
677
+   /usr/local/bin/swift-remakerings
678
+
679
+   # Start everything
680
+   /usr/local/bin/swift-startmain || :
681
+   
682
+   # This should work (tempauth)
683
+   # swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing stat
676 684
    unset s swift_hasH
677 685
    
678 686
 fi