Fix some retarness along the way.
| ... | ... |
@@ -16,7 +16,7 @@ user_admin_admin = admin .admin .reseller_admin |
| 16 | 16 |
user_test_tester = testing .admin |
| 17 | 17 |
user_test2_tester2 = testing2 .admin |
| 18 | 18 |
user_test_tester3 = testing3 |
| 19 |
-bind_ip = ${MY_IP}
|
|
| 19 |
+bind_ip = 0.0.0.0 |
|
| 20 | 20 |
|
| 21 | 21 |
[filter:healthcheck] |
| 22 | 22 |
use = egg:swift#healthcheck |
| ... | ... |
@@ -6,74 +6,74 @@ address = 127.0.0.1 |
| 6 | 6 |
|
| 7 | 7 |
[account6012] |
| 8 | 8 |
max connections = 25 |
| 9 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/1/node/ |
|
| 9 |
+path = %SWIFT_LOCATION%/1/node/ |
|
| 10 | 10 |
read only = false |
| 11 | 11 |
lock file = /var/lock/account6012.lock |
| 12 | 12 |
|
| 13 | 13 |
[account6022] |
| 14 | 14 |
max connections = 25 |
| 15 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/2/node/ |
|
| 15 |
+path = %SWIFT_LOCATION%/2/node/ |
|
| 16 | 16 |
read only = false |
| 17 | 17 |
lock file = /var/lock/account6022.lock |
| 18 | 18 |
|
| 19 | 19 |
[account6032] |
| 20 | 20 |
max connections = 25 |
| 21 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/3/node/ |
|
| 21 |
+path = %SWIFT_LOCATION%/3/node/ |
|
| 22 | 22 |
read only = false |
| 23 | 23 |
lock file = /var/lock/account6032.lock |
| 24 | 24 |
|
| 25 | 25 |
[account6042] |
| 26 | 26 |
max connections = 25 |
| 27 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/4/node/ |
|
| 27 |
+path = %SWIFT_LOCATION%/4/node/ |
|
| 28 | 28 |
read only = false |
| 29 | 29 |
lock file = /var/lock/account6042.lock |
| 30 | 30 |
|
| 31 | 31 |
|
| 32 | 32 |
[container6011] |
| 33 | 33 |
max connections = 25 |
| 34 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/1/node/ |
|
| 34 |
+path = %SWIFT_LOCATION%/1/node/ |
|
| 35 | 35 |
read only = false |
| 36 | 36 |
lock file = /var/lock/container6011.lock |
| 37 | 37 |
|
| 38 | 38 |
[container6021] |
| 39 | 39 |
max connections = 25 |
| 40 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/2/node/ |
|
| 40 |
+path = %SWIFT_LOCATION%/2/node/ |
|
| 41 | 41 |
read only = false |
| 42 | 42 |
lock file = /var/lock/container6021.lock |
| 43 | 43 |
|
| 44 | 44 |
[container6031] |
| 45 | 45 |
max connections = 25 |
| 46 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/3/node/ |
|
| 46 |
+path = %SWIFT_LOCATION%/3/node/ |
|
| 47 | 47 |
read only = false |
| 48 | 48 |
lock file = /var/lock/container6031.lock |
| 49 | 49 |
|
| 50 | 50 |
[container6041] |
| 51 | 51 |
max connections = 25 |
| 52 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/4/node/ |
|
| 52 |
+path = %SWIFT_LOCATION%/4/node/ |
|
| 53 | 53 |
read only = false |
| 54 | 54 |
lock file = /var/lock/container6041.lock |
| 55 | 55 |
|
| 56 | 56 |
|
| 57 | 57 |
[object6010] |
| 58 | 58 |
max connections = 25 |
| 59 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/1/node/ |
|
| 59 |
+path = %SWIFT_LOCATION%/1/node/ |
|
| 60 | 60 |
read only = false |
| 61 | 61 |
lock file = /var/lock/object6010.lock |
| 62 | 62 |
|
| 63 | 63 |
[object6020] |
| 64 | 64 |
max connections = 25 |
| 65 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/2/node/ |
|
| 65 |
+path = %SWIFT_LOCATION%/2/node/ |
|
| 66 | 66 |
read only = false |
| 67 | 67 |
lock file = /var/lock/object6020.lock |
| 68 | 68 |
|
| 69 | 69 |
[object6030] |
| 70 | 70 |
max connections = 25 |
| 71 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/3/node/ |
|
| 71 |
+path = %SWIFT_LOCATION%/3/node/ |
|
| 72 | 72 |
read only = false |
| 73 | 73 |
lock file = /var/lock/object6030.lock |
| 74 | 74 |
|
| 75 | 75 |
[object6040] |
| 76 | 76 |
max connections = 25 |
| 77 |
-path = %SWIFT_LOOPBACK_DISK_SIZE%/4/node/ |
|
| 77 |
+path = %SWIFT_LOCATION%/4/node/ |
|
| 78 | 78 |
read only = false |
| 79 | 79 |
lock file = /var/lock/object6040.lock |
| ... | ... |
@@ -275,7 +275,7 @@ GLANCE_HOSTPORT=${GLANCE_HOSTPORT:-$HOST_IP:9292}
|
| 275 | 275 |
# ----- |
| 276 | 276 |
# |
| 277 | 277 |
# Location of SWIFT drives |
| 278 |
-SWIFT_DRIVE_LOCATION=${SWIFT_DRIVE_LOCATION:-/srv}
|
|
| 278 |
+SWIFT_LOCATION=${SWIFT_LOCATION:-/srv}
|
|
| 279 | 279 |
|
| 280 | 280 |
# Size of the loopback disks |
| 281 | 281 |
SWIFT_LOOPBACK_DISK_SIZE=${SWIFT_LOOPBACK_DISK_SIZE:-1000000}
|
| ... | ... |
@@ -594,19 +594,19 @@ fi |
| 594 | 594 |
|
| 595 | 595 |
# Storage Service |
| 596 | 596 |
if [[ "$ENABLED_SERVICES" =~ "swift" ]];then |
| 597 |
- mkdir -p ${SWIFT_DRIVE_LOCATION}/drives
|
|
| 598 |
- local s=${SWIFT_DRIVE_LOCATION}/drives/sdb1 # Shortcut variable
|
|
| 597 |
+ mkdir -p ${SWIFT_LOCATION}/drives
|
|
| 598 |
+ local s=${SWIFT_LOCATION}/drives/sdb1 # Shortcut variable
|
|
| 599 | 599 |
|
| 600 | 600 |
# Create a loopback disk and format it with XFS. |
| 601 |
- if [[ ! -e ${SWIFT_DRIVE_LOCATION}/swift-disk ]];then
|
|
| 602 |
- dd if=/dev/zero of=${SWIFT_DRIVE_LOCATION}/swift-disk bs=1024 count=0 seek=${SWIFT_LOOPBACK_DISK_SIZE}
|
|
| 603 |
- mkfs.xfs -f -i size=1024 ${SWIFT_DRIVE_LOCATION}/swift-disk
|
|
| 601 |
+ if [[ ! -e ${SWIFT_LOCATION}/swift-disk ]];then
|
|
| 602 |
+ dd if=/dev/zero of=${SWIFT_LOCATION}/swift-disk bs=1024 count=0 seek=${SWIFT_LOOPBACK_DISK_SIZE}
|
|
| 603 |
+ mkfs.xfs -f -i size=1024 ${SWIFT_LOCATION}/swift-disk
|
|
| 604 | 604 |
fi |
| 605 | 605 |
|
| 606 | 606 |
# Add the mountpoint to fstab |
| 607 |
- if ! egrep -q "^${SWIFT_DRIVE_LOCATION}/swift-disk" /etc/fstab;then
|
|
| 607 |
+ if ! egrep -q "^${SWIFT_LOCATION}/swift-disk" /etc/fstab;then
|
|
| 608 | 608 |
echo "# Added by devstack" | tee -a /etc/fstab |
| 609 |
- echo "${SWIFT_DRIVE_LOCATION}/swift-disk ${s} xfs loop,noatime,nodiratime,nobarrier,logbufs=8 0 0" | \
|
|
| 609 |
+ echo "${SWIFT_LOCATION}/swift-disk ${s} xfs loop,noatime,nodiratime,nobarrier,logbufs=8 0 0" | \
|
|
| 610 | 610 |
tee -a /etc/fstab |
| 611 | 611 |
fi |
| 612 | 612 |
|
| ... | ... |
@@ -617,7 +617,7 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]];then |
| 617 | 617 |
|
| 618 | 618 |
# Create directories |
| 619 | 619 |
install -g stack -o stack -d /etc/swift/{object,container,account}-server \
|
| 620 |
- ${SWIFT_DRIVE_LOCATION}/{1..4}/node/sdb1 /var/run/swift
|
|
| 620 |
+ ${SWIFT_LOCATION}/{1..4}/node/sdb1 /var/run/swift
|
|
| 621 | 621 |
|
| 622 | 622 |
# Adjust rc.local to always have a /var/run/swift on reboot |
| 623 | 623 |
# created and chown to our user. |
| ... | ... |
@@ -630,7 +630,7 @@ exit 0 |
| 630 | 630 |
EOF |
| 631 | 631 |
|
| 632 | 632 |
# Add rsync file |
| 633 |
- sed -e "s/%SWIFT_LOOPBACK_DISK_SIZE%/$SWIFT_DRIVE_LOCATION/" $FILES/swift-rsyncd.conf > /etc/rsyncd.conf |
|
| 633 |
+ sed -e "s/%SWIFT_LOCATION%/$SWIFT_LOCATION/" $FILES/swift-rsyncd.conf > /etc/rsyncd.conf |
|
| 634 | 634 |
|
| 635 | 635 |
# Copy proxy-server configuration |
| 636 | 636 |
cp $FILES/swift-proxy-server.conf /etc/swift/ |
| ... | ... |
@@ -648,7 +648,7 @@ EOF |
| 648 | 648 |
local bind_port=$2 |
| 649 | 649 |
local log_facility=$3 |
| 650 | 650 |
for node_number in {1..4};do
|
| 651 |
- node_path=${SWIFT_DRIVE_LOCATION}/${node_number}/node
|
|
| 651 |
+ node_path=${SWIFT_LOCATION}/${node_number}/node
|
|
| 652 | 652 |
sed -e "s/%NODE_PATH%/${node_path}/;s/%BIND_PORT%/${bind_port}/;s/%LOG_FACILITY%/${log_facility}/" \
|
| 653 | 653 |
$FILES/swift-${server_type}-server.conf > /etc/swift/${server_type}-server/${node_number}.conf
|
| 654 | 654 |
bind_port=$(( ${bind_port} + 10 ))
|