From e11a38c63af97df83b296e836fdd403b0ac3af41 Mon Sep 17 00:00:00 2001 From: Matthew Oliver Date: Mon, 19 Jun 2017 09:39:33 +1000 Subject: [PATCH] Bind SAIO services on different loopback addresses Currently all devices in the ring and all services in a SAIO all bind to the same loopback address 127.0.0.1. But this breaks servers_per_port if you want to do any testing on that. This change binds each service to a different loopback address and updates the rings (remakerings) accordingly. To make sure rysncd binds correctly the bind address needed to be changed to listen on all addresses (0.0.0.0). Change-Id: I7e77434f275df1e2699de495d8b622b90157a9d7 --- doc/saio/bin/remakerings | 36 ++++++++++---------- doc/saio/rsyncd.conf | 2 +- doc/saio/swift/account-server/2.conf | 2 +- doc/saio/swift/account-server/3.conf | 2 +- doc/saio/swift/account-server/4.conf | 2 +- doc/saio/swift/container-server/2.conf | 2 +- doc/saio/swift/container-server/3.conf | 2 +- doc/saio/swift/container-server/4.conf | 2 +- doc/saio/swift/object-server/2.conf | 2 +- doc/saio/swift/object-server/3.conf | 2 +- doc/saio/swift/object-server/4.conf | 2 +- doc/source/development_saio.rst | 47 +++++++++++++------------- 12 files changed, 52 insertions(+), 51 deletions(-) diff --git a/doc/saio/bin/remakerings b/doc/saio/bin/remakerings index c067f1b102..bd7dd49262 100755 --- a/doc/saio/bin/remakerings +++ b/doc/saio/bin/remakerings @@ -8,35 +8,35 @@ rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz swift-ring-builder object.builder create 10 3 1 swift-ring-builder object.builder add r1z1-127.0.0.1:6010/sdb1 1 -swift-ring-builder object.builder add r1z2-127.0.0.1:6020/sdb2 1 -swift-ring-builder object.builder add r1z3-127.0.0.1:6030/sdb3 1 -swift-ring-builder object.builder add r1z4-127.0.0.1:6040/sdb4 1 +swift-ring-builder object.builder add r1z2-127.0.0.2:6020/sdb2 1 +swift-ring-builder object.builder add r1z3-127.0.0.3:6030/sdb3 1 +swift-ring-builder object.builder add r1z4-127.0.0.4:6040/sdb4 1 swift-ring-builder object.builder rebalance swift-ring-builder object-1.builder create 10 2 1 swift-ring-builder object-1.builder add r1z1-127.0.0.1:6010/sdb1 1 -swift-ring-builder object-1.builder add r1z2-127.0.0.1:6020/sdb2 1 -swift-ring-builder object-1.builder add r1z3-127.0.0.1:6030/sdb3 1 -swift-ring-builder object-1.builder add r1z4-127.0.0.1:6040/sdb4 1 +swift-ring-builder object-1.builder add r1z2-127.0.0.2:6020/sdb2 1 +swift-ring-builder object-1.builder add r1z3-127.0.0.3:6030/sdb3 1 +swift-ring-builder object-1.builder add r1z4-127.0.0.4:6040/sdb4 1 swift-ring-builder object-1.builder rebalance swift-ring-builder object-2.builder create 10 6 1 swift-ring-builder object-2.builder add r1z1-127.0.0.1:6010/sdb1 1 swift-ring-builder object-2.builder add r1z1-127.0.0.1:6010/sdb5 1 -swift-ring-builder object-2.builder add r1z2-127.0.0.1:6020/sdb2 1 -swift-ring-builder object-2.builder add r1z2-127.0.0.1:6020/sdb6 1 -swift-ring-builder object-2.builder add r1z3-127.0.0.1:6030/sdb3 1 -swift-ring-builder object-2.builder add r1z3-127.0.0.1:6030/sdb7 1 -swift-ring-builder object-2.builder add r1z4-127.0.0.1:6040/sdb4 1 -swift-ring-builder object-2.builder add r1z4-127.0.0.1:6040/sdb8 1 +swift-ring-builder object-2.builder add r1z2-127.0.0.2:6020/sdb2 1 +swift-ring-builder object-2.builder add r1z2-127.0.0.2:6020/sdb6 1 +swift-ring-builder object-2.builder add r1z3-127.0.0.3:6030/sdb3 1 +swift-ring-builder object-2.builder add r1z3-127.0.0.3:6030/sdb7 1 +swift-ring-builder object-2.builder add r1z4-127.0.0.4:6040/sdb4 1 +swift-ring-builder object-2.builder add r1z4-127.0.0.4:6040/sdb8 1 swift-ring-builder object-2.builder rebalance swift-ring-builder container.builder create 10 3 1 swift-ring-builder container.builder add r1z1-127.0.0.1:6011/sdb1 1 -swift-ring-builder container.builder add r1z2-127.0.0.1:6021/sdb2 1 -swift-ring-builder container.builder add r1z3-127.0.0.1:6031/sdb3 1 -swift-ring-builder container.builder add r1z4-127.0.0.1:6041/sdb4 1 +swift-ring-builder container.builder add r1z2-127.0.0.2:6021/sdb2 1 +swift-ring-builder container.builder add r1z3-127.0.0.3:6031/sdb3 1 +swift-ring-builder container.builder add r1z4-127.0.0.4:6041/sdb4 1 swift-ring-builder container.builder rebalance swift-ring-builder account.builder create 10 3 1 swift-ring-builder account.builder add r1z1-127.0.0.1:6012/sdb1 1 -swift-ring-builder account.builder add r1z2-127.0.0.1:6022/sdb2 1 -swift-ring-builder account.builder add r1z3-127.0.0.1:6032/sdb3 1 -swift-ring-builder account.builder add r1z4-127.0.0.1:6042/sdb4 1 +swift-ring-builder account.builder add r1z2-127.0.0.2:6022/sdb2 1 +swift-ring-builder account.builder add r1z3-127.0.0.3:6032/sdb3 1 +swift-ring-builder account.builder add r1z4-127.0.0.4:6042/sdb4 1 swift-ring-builder account.builder rebalance diff --git a/doc/saio/rsyncd.conf b/doc/saio/rsyncd.conf index 1ff40af607..0ed8dd6637 100644 --- a/doc/saio/rsyncd.conf +++ b/doc/saio/rsyncd.conf @@ -2,7 +2,7 @@ uid = gid = log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid -address = 127.0.0.1 +address = 0.0.0.0 [account6012] max connections = 25 diff --git a/doc/saio/swift/account-server/2.conf b/doc/saio/swift/account-server/2.conf index 70f8fae896..37cae43dfc 100644 --- a/doc/saio/swift/account-server/2.conf +++ b/doc/saio/swift/account-server/2.conf @@ -2,7 +2,7 @@ devices = /srv/2/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.2 bind_port = 6022 workers = 1 user = diff --git a/doc/saio/swift/account-server/3.conf b/doc/saio/swift/account-server/3.conf index 6090883bd7..8931672eae 100644 --- a/doc/saio/swift/account-server/3.conf +++ b/doc/saio/swift/account-server/3.conf @@ -2,7 +2,7 @@ devices = /srv/3/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.3 bind_port = 6032 workers = 1 user = diff --git a/doc/saio/swift/account-server/4.conf b/doc/saio/swift/account-server/4.conf index e435842d1a..343bc43e6e 100644 --- a/doc/saio/swift/account-server/4.conf +++ b/doc/saio/swift/account-server/4.conf @@ -2,7 +2,7 @@ devices = /srv/4/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.4 bind_port = 6042 workers = 1 user = diff --git a/doc/saio/swift/container-server/2.conf b/doc/saio/swift/container-server/2.conf index 7046236fae..0b29ada029 100644 --- a/doc/saio/swift/container-server/2.conf +++ b/doc/saio/swift/container-server/2.conf @@ -2,7 +2,7 @@ devices = /srv/2/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.2 bind_port = 6021 workers = 1 user = diff --git a/doc/saio/swift/container-server/3.conf b/doc/saio/swift/container-server/3.conf index c7f726199c..9f340d07e6 100644 --- a/doc/saio/swift/container-server/3.conf +++ b/doc/saio/swift/container-server/3.conf @@ -2,7 +2,7 @@ devices = /srv/3/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.3 bind_port = 6031 workers = 1 user = diff --git a/doc/saio/swift/container-server/4.conf b/doc/saio/swift/container-server/4.conf index ff9c0e806a..5e95e9c57c 100644 --- a/doc/saio/swift/container-server/4.conf +++ b/doc/saio/swift/container-server/4.conf @@ -2,7 +2,7 @@ devices = /srv/4/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.4 bind_port = 6041 workers = 1 user = diff --git a/doc/saio/swift/object-server/2.conf b/doc/saio/swift/object-server/2.conf index 3d863cf59b..8d99b02871 100644 --- a/doc/saio/swift/object-server/2.conf +++ b/doc/saio/swift/object-server/2.conf @@ -2,7 +2,7 @@ devices = /srv/2/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.2 bind_port = 6020 workers = 1 user = diff --git a/doc/saio/swift/object-server/3.conf b/doc/saio/swift/object-server/3.conf index d99995bb5e..fe6cef65a0 100644 --- a/doc/saio/swift/object-server/3.conf +++ b/doc/saio/swift/object-server/3.conf @@ -2,7 +2,7 @@ devices = /srv/3/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.3 bind_port = 6030 workers = 1 user = diff --git a/doc/saio/swift/object-server/4.conf b/doc/saio/swift/object-server/4.conf index 9f6fd1fc13..86ba2621ed 100644 --- a/doc/saio/swift/object-server/4.conf +++ b/doc/saio/swift/object-server/4.conf @@ -2,7 +2,7 @@ devices = /srv/4/node mount_check = false disable_fallocate = true -bind_ip = 127.0.0.1 +bind_ip = 127.0.0.4 bind_port = 6040 workers = 1 user = diff --git a/doc/source/development_saio.rst b/doc/source/development_saio.rst index 088dfbc134..7afe70d7fa 100644 --- a/doc/source/development_saio.rst +++ b/doc/source/development_saio.rst @@ -494,34 +494,35 @@ Setting up scripts for running Swift for 2x replication, but those rings only use 4 devices:: Device d0r1z1-127.0.0.1:6010R127.0.0.1:6010/sdb1_"" with 1.0 weight got id 0 - Device d1r1z2-127.0.0.1:6020R127.0.0.1:6020/sdb2_"" with 1.0 weight got id 1 - Device d2r1z3-127.0.0.1:6030R127.0.0.1:6030/sdb3_"" with 1.0 weight got id 2 - Device d3r1z4-127.0.0.1:6040R127.0.0.1:6040/sdb4_"" with 1.0 weight got id 3 - Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 + Device d1r1z2-127.0.0.2:6020R127.0.0.2:6020/sdb2_"" with 1.0 weight got id 1 + Device d2r1z3-127.0.0.3:6030R127.0.0.3:6030/sdb3_"" with 1.0 weight got id 2 + Device d3r1z4-127.0.0.4:6040R127.0.0.4:6040/sdb4_"" with 1.0 weight got id 3 + Reassigned 3072 (300.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 Device d0r1z1-127.0.0.1:6010R127.0.0.1:6010/sdb1_"" with 1.0 weight got id 0 - Device d1r1z2-127.0.0.1:6020R127.0.0.1:6020/sdb2_"" with 1.0 weight got id 1 - Device d2r1z3-127.0.0.1:6030R127.0.0.1:6030/sdb3_"" with 1.0 weight got id 2 - Device d3r1z4-127.0.0.1:6040R127.0.0.1:6040/sdb4_"" with 1.0 weight got id 3 - Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 + Device d1r1z2-127.0.0.2:6020R127.0.0.2:6020/sdb2_"" with 1.0 weight got id 1 + Device d2r1z3-127.0.0.3:6030R127.0.0.3:6030/sdb3_"" with 1.0 weight got id 2 + Device d3r1z4-127.0.0.4:6040R127.0.0.4:6040/sdb4_"" with 1.0 weight got id 3 + Reassigned 2048 (200.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 Device d0r1z1-127.0.0.1:6010R127.0.0.1:6010/sdb1_"" with 1.0 weight got id 0 Device d1r1z1-127.0.0.1:6010R127.0.0.1:6010/sdb5_"" with 1.0 weight got id 1 - Device d2r1z2-127.0.0.1:6020R127.0.0.1:6020/sdb2_"" with 1.0 weight got id 2 - Device d3r1z2-127.0.0.1:6020R127.0.0.1:6020/sdb6_"" with 1.0 weight got id 3 - Device d4r1z3-127.0.0.1:6030R127.0.0.1:6030/sdb3_"" with 1.0 weight got id 4 - Device d5r1z3-127.0.0.1:6030R127.0.0.1:6030/sdb7_"" with 1.0 weight got id 5 - Device d6r1z4-127.0.0.1:6040R127.0.0.1:6040/sdb4_"" with 1.0 weight got id 6 - Device d7r1z4-127.0.0.1:6040R127.0.0.1:6040/sdb8_"" with 1.0 weight got id 7 - Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 + Device d2r1z2-127.0.0.2:6020R127.0.0.2:6020/sdb2_"" with 1.0 weight got id 2 + Device d3r1z2-127.0.0.2:6020R127.0.0.2:6020/sdb6_"" with 1.0 weight got id 3 + Device d4r1z3-127.0.0.3:6030R127.0.0.3:6030/sdb3_"" with 1.0 weight got id 4 + Device d5r1z3-127.0.0.3:6030R127.0.0.3:6030/sdb7_"" with 1.0 weight got id 5 + Device d6r1z4-127.0.0.4:6040R127.0.0.4:6040/sdb4_"" with 1.0 weight got id 6 + Device d7r1z4-127.0.0.4:6040R127.0.0.4:6040/sdb8_"" with 1.0 weight got id 7 + Reassigned 6144 (600.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 Device d0r1z1-127.0.0.1:6011R127.0.0.1:6011/sdb1_"" with 1.0 weight got id 0 - Device d1r1z2-127.0.0.1:6021R127.0.0.1:6021/sdb2_"" with 1.0 weight got id 1 - Device d2r1z3-127.0.0.1:6031R127.0.0.1:6031/sdb3_"" with 1.0 weight got id 2 - Device d3r1z4-127.0.0.1:6041R127.0.0.1:6041/sdb4_"" with 1.0 weight got id 3 - Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 + Device d1r1z2-127.0.0.2:6021R127.0.0.2:6021/sdb2_"" with 1.0 weight got id 1 + Device d2r1z3-127.0.0.3:6031R127.0.0.3:6031/sdb3_"" with 1.0 weight got id 2 + Device d3r1z4-127.0.0.4:6041R127.0.0.4:6041/sdb4_"" with 1.0 weight got id 3 + Reassigned 3072 (300.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 Device d0r1z1-127.0.0.1:6012R127.0.0.1:6012/sdb1_"" with 1.0 weight got id 0 - Device d1r1z2-127.0.0.1:6022R127.0.0.1:6022/sdb2_"" with 1.0 weight got id 1 - Device d2r1z3-127.0.0.1:6032R127.0.0.1:6032/sdb3_"" with 1.0 weight got id 2 - Device d3r1z4-127.0.0.1:6042R127.0.0.1:6042/sdb4_"" with 1.0 weight got id 3 - Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 + Device d1r1z2-127.0.0.2:6022R127.0.0.2:6022/sdb2_"" with 1.0 weight got id 1 + Device d2r1z3-127.0.0.3:6032R127.0.0.3:6032/sdb3_"" with 1.0 weight got id 2 + Device d3r1z4-127.0.0.4:6042R127.0.0.4:6042/sdb4_"" with 1.0 weight got id 3 + Reassigned 3072 (300.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 + #. Read more about Storage Policies and your SAIO :doc:`policies_saio`