<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-western">To set the stage, for the
purposes of testing I am implementing a swift instance with the
proxy and object store on a single machine. I am planning to use
swauth in place of keystone for this test instance. The machine
has three drives, mounted thus:
<br>
<br>
# df -h | grep srv
<br>
/dev/sdb 465G 33M 465G 1% /srv/node/sdb
<br>
/dev/sdc 465G 33M 465G 1% /srv/node/sdc
<br>
/dev/sdd 465G 33M 465G 1% /srv/node/sdd
<br>
<br>
I have configured them like this:
<br>
<br>
swift-ring-builder account.builder create 18 3 1
<br>
swift-ring-builder account.builder add z2-10.30.177.41:6000/sdb
100
<br>
swift-ring-builder account.builder add z3-10.30.177.41:6001/sdc
100
<br>
swift-ring-builder account.builder add z4-10.30.177.41:6002/sdd
100
<br>
<br>
swift-ring-builder container.builder create 18 3 1
<br>
swift-ring-builder container.builder add z2-10.30.177.41:6100/sdb
100
<br>
swift-ring-builder container.builder add z3-10.30.177.41:6101/sdc
100
<br>
swift-ring-builder container.builder add z4-10.30.177.41:6102/sdd
100
<br>
<br>
swift-ring-builder object.builder create 18 3 1
<br>
swift-ring-builder object.builder add z2-10.30.177.41:6200/sdb 100
<br>
swift-ring-builder object.builder add z3-10.30.177.41:6201/sdc 100
<br>
swift-ring-builder object.builder add z4-10.30.177.41:6202/sdd 100
<br>
<br>
swift-ring-builder account.builder rebalance
<br>
swift-ring-builder container.builder rebalance
<br>
swift-ring-builder object.builder rebalance
<br>
<br>
The results from this are what I think I should expect:
<br>
<br>
Device z2-10.30.177.41:6000/sdb_"" with 100.0 weight got id 0
<br>
Device z3-10.30.177.41:6001/sdc_"" with 100.0 weight got id 1
<br>
Device z4-10.30.177.41:6002/sdd_"" with 100.0 weight got id 2
<br>
Device z2-10.30.177.41:6100/sdb_"" with 100.0 weight got id 0
<br>
Device z3-10.30.177.41:6101/sdc_"" with 100.0 weight got id 1
<br>
Device z4-10.30.177.41:6102/sdd_"" with 100.0 weight got id 2
<br>
Device z2-10.30.177.41:6200/sdb_"" with 100.0 weight got id 0
<br>
Device z3-10.30.177.41:6201/sdc_"" with 100.0 weight got id 1
<br>
Device z4-10.30.177.41:6202/sdd_"" with 100.0 weight got id 2
<br>
Reassigned 262144 (100.00%) partitions. Balance is now 0.00.
<br>
Reassigned 262144 (100.00%) partitions. Balance is now 0.00.
<br>
Reassigned 262144 (100.00%) partitions. Balance is now 0.00.
<br>
<br>
/etc/swift# swift-ring-builder account.builder
<br>
account.builder, build version 3
<br>
262144 partitions, 3 replicas, 3 zones, 3 devices, 0.00 balance
<br>
The minimum number of hours before a partition can be reassigned
is 1
<br>
Devices: id zone ip address port name weight
partitions balance meta
<br>
0 2 10.30.177.41 6000 sdb 100.00
262144 0.00
<br>
1 3 10.30.177.41 6001 sdc 100.00
262144 0.00
<br>
2 4 10.30.177.41 6002 sdd 100.00
262144 0.00
<br>
/etc/swift# swift-ring-builder container.builder
<br>
container.builder, build version 3
<br>
262144 partitions, 3 replicas, 3 zones, 3 devices, 0.00 balance
<br>
The minimum number of hours before a partition can be reassigned
is 1
<br>
Devices: id zone ip address port name weight
partitions balance meta
<br>
0 2 10.30.177.41 6100 sdb 100.00
262144 0.00
<br>
1 3 10.30.177.41 6101 sdc 100.00
262144 0.00
<br>
2 4 10.30.177.41 6102 sdd 100.00
262144 0.00
<br>
/etc/swift# swift-ring-builder object.builder
<br>
object.builder, build version 3
<br>
262144 partitions, 3 replicas, 3 zones, 3 devices, 0.00 balance
<br>
The minimum number of hours before a partition can be reassigned
is 1
<br>
Devices: id zone ip address port name weight
partitions balance meta
<br>
0 2 10.30.177.41 6200 sdb 100.00
262144 0.00
<br>
1 3 10.30.177.41 6201 sdc 100.00
262144 0.00
<br>
2 4 10.30.177.41 6202 sdd 100.00
262144 0.00
<br>
<br>
I start swift:
<br>
<br>
/etc/swift# swift-init all start
<br>
Starting container-updater...(/etc/swift/container-server.conf)
<br>
Starting account-auditor...(/etc/swift/account-server.conf)
<br>
Starting object-replicator...(/etc/swift/object-server.conf)
<br>
Starting proxy-server...(/etc/swift/proxy-server.conf)
<br>
Starting container-replicator...(/etc/swift/container-server.conf)
<br>
Starting object-auditor...(/etc/swift/object-server.conf)
<br>
Unable to locate config for object-expirer
<br>
Starting container-auditor...(/etc/swift/container-server.conf)
<br>
Starting container-server...(/etc/swift/container-server.conf)
<br>
Starting account-server...(/etc/swift/account-server.conf)
<br>
Starting account-reaper...(/etc/swift/account-server.conf)
<br>
Starting container-sync...(/etc/swift/container-server.conf)
<br>
Starting account-replicator...(/etc/swift/account-server.conf)
<br>
Starting object-updater...(/etc/swift/object-server.conf)
<br>
Starting object-server...(/etc/swift/object-server.conf)
<br>
Unable to find container-sync config section in
/etc/swift/container-server.conf
<br>
<br>
I don't see binds to the ports I specified above, specifically
6000, 6001, 6002, 6000, 6101, 6102, 6200, 6201, 6202:
<br>
<br>
/etc/swift# lsof -i :6000
<br>
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
<br>
swift-obj 4320 swift 4u IPv4 67230 0t0 TCP *:x11
(LISTEN)
<br>
swift-obj 4380 swift 4u IPv4 67230 0t0 TCP *:x11
(LISTEN)
<br>
swift-obj 4381 swift 4u IPv4 67230 0t0 TCP *:x11
(LISTEN)
<br>
swift-obj 4382 swift 4u IPv4 67230 0t0 TCP *:x11
(LISTEN)
<br>
swift-obj 4383 swift 4u IPv4 67230 0t0 TCP *:x11
(LISTEN)
<br>
swift-obj 4384 swift 4u IPv4 67230 0t0 TCP *:x11
(LISTEN)
<br>
/etc/swift# lsof -i :6001
<br>
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
<br>
swift-con 4308 swift 4u IPv4 78900 0t0 TCP *:x11-1
(LISTEN)
<br>
swift-con 4365 swift 4u IPv4 78900 0t0 TCP *:x11-1
(LISTEN)
<br>
swift-con 4366 swift 4u IPv4 78900 0t0 TCP *:x11-1
(LISTEN)
<br>
swift-con 4367 swift 4u IPv4 78900 0t0 TCP *:x11-1
(LISTEN)
<br>
swift-con 4368 swift 4u IPv4 78900 0t0 TCP *:x11-1
(LISTEN)
<br>
swift-con 4369 swift 4u IPv4 78900 0t0 TCP *:x11-1
(LISTEN)
<br>
/etc/swift# lsof -i :6002
<br>
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
<br>
swift-acc 4311 swift 4u IPv4 78119 0t0 TCP *:x11-2
(LISTEN)
<br>
swift-acc 4372 swift 4u IPv4 78119 0t0 TCP *:x11-2
(LISTEN)
<br>
swift-acc 4374 swift 4u IPv4 78119 0t0 TCP *:x11-2
(LISTEN)
<br>
swift-acc 4375 swift 4u IPv4 78119 0t0 TCP *:x11-2
(LISTEN)
<br>
swift-acc 4376 swift 4u IPv4 78119 0t0 TCP *:x11-2
(LISTEN)
<br>
swift-acc 4377 swift 4u IPv4 78119 0t0 TCP *:x11-2
(LISTEN)
<br>
/etc/swift# lsof -i :6100
<br>
/etc/swift# lsof -i :6101
<br>
/etc/swift# lsof -i :6102
<br>
/etc/swift# lsof -i :6200
<br>
/etc/swift# lsof -i :6201
<br>
/etc/swift# lsof -i :6202
<br>
<br>
So when I attempt to initialize the swauth backing store in swift
I get the 'socket.error: [Errno 111] ECONNREFUSED' error below,
which is sort of expected:
<br>
<br>
/etc/swift# swauth-prep -K swauthkey -Ahttp://127.0.0.1:8080/auth
<br>
Traceback (most recent call last):
<br>
File "/usr/bin/swauth-prep", line 56, in <module>
<br>
ssl=(parsed.scheme == 'https'))
<br>
File
"/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py",
line 175, in http_connect_raw
<br>
conn.endheaders()
<br>
File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
<br>
self._send_output(message_body)
<br>
File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
<br>
self.send(msg)
<br>
File "/usr/lib/python2.7/httplib.py", line 776, in send
<br>
self.connect()
<br>
File
"/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py",
line 87, in connect
<br>
return HTTPConnection.connect(self)
<br>
File "/usr/lib/python2.7/httplib.py", line 757, in connect
<br>
self.timeout, self.source_address)
<br>
File
"/usr/lib/python2.7/dist-packages/eventlet/green/socket.py", line
59, in create_connection
<br>
raise error, msg
<br>
socket.error: [Errno 111] ECONNREFUSED
<br>
<br>
Can you point me in the right direction for why this isn't working
as expected?
<br>
<br>
Regards,
<br>
-Steve
<br>
<br>
</div>
</body>
</html>