[Openstack] [Swift] Problems during initial configuration

Steve Carter svenphx at gmail.com
Fri Aug 16 20:11:26 UTC 2013


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:

# df -h | grep srv
/dev/sdb        465G   33M  465G   1% /srv/node/sdb
/dev/sdc        465G   33M  465G   1% /srv/node/sdc
/dev/sdd        465G   33M  465G   1% /srv/node/sdd

I have configured them like this:

swift-ring-builder account.builder create 18 3 1
swift-ring-builder account.builder add z2-10.30.177.41:6000/sdb 100
swift-ring-builder account.builder add z3-10.30.177.41:6001/sdc 100
swift-ring-builder account.builder add z4-10.30.177.41:6002/sdd 100

swift-ring-builder container.builder create 18 3 1
swift-ring-builder container.builder add z2-10.30.177.41:6100/sdb 100
swift-ring-builder container.builder add z3-10.30.177.41:6101/sdc 100
swift-ring-builder container.builder add z4-10.30.177.41:6102/sdd 100

swift-ring-builder object.builder create 18 3 1
swift-ring-builder object.builder add z2-10.30.177.41:6200/sdb 100
swift-ring-builder object.builder add z3-10.30.177.41:6201/sdc 100
swift-ring-builder object.builder add z4-10.30.177.41:6202/sdd 100

swift-ring-builder account.builder rebalance
swift-ring-builder container.builder rebalance
swift-ring-builder object.builder rebalance

The results from this are what I think I should expect:

Device z2-10.30.177.41:6000/sdb_"" with 100.0 weight got id 0
Device z3-10.30.177.41:6001/sdc_"" with 100.0 weight got id 1
Device z4-10.30.177.41:6002/sdd_"" with 100.0 weight got id 2
Device z2-10.30.177.41:6100/sdb_"" with 100.0 weight got id 0
Device z3-10.30.177.41:6101/sdc_"" with 100.0 weight got id 1
Device z4-10.30.177.41:6102/sdd_"" with 100.0 weight got id 2
Device z2-10.30.177.41:6200/sdb_"" with 100.0 weight got id 0
Device z3-10.30.177.41:6201/sdc_"" with 100.0 weight got id 1
Device z4-10.30.177.41:6202/sdd_"" with 100.0 weight got id 2
Reassigned 262144 (100.00%) partitions. Balance is now 0.00.
Reassigned 262144 (100.00%) partitions. Balance is now 0.00.
Reassigned 262144 (100.00%) partitions. Balance is now 0.00.

/etc/swift# swift-ring-builder account.builder
account.builder, build version 3
262144 partitions, 3 replicas, 3 zones, 3 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices:    id  zone      ip address  port      name weight partitions 
balance meta
              0     2    10.30.177.41  6000       sdb 100.00 262144    0.00
              1     3    10.30.177.41  6001       sdc 100.00 262144    0.00
              2     4    10.30.177.41  6002       sdd 100.00 262144    0.00
/etc/swift# swift-ring-builder container.builder
container.builder, build version 3
262144 partitions, 3 replicas, 3 zones, 3 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices:    id  zone      ip address  port      name weight partitions 
balance meta
              0     2    10.30.177.41  6100       sdb 100.00 262144    0.00
              1     3    10.30.177.41  6101       sdc 100.00 262144    0.00
              2     4    10.30.177.41  6102       sdd 100.00 262144    0.00
/etc/swift# swift-ring-builder object.builder
object.builder, build version 3
262144 partitions, 3 replicas, 3 zones, 3 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices:    id  zone      ip address  port      name weight partitions 
balance meta
              0     2    10.30.177.41  6200       sdb 100.00 262144    0.00
              1     3    10.30.177.41  6201       sdc 100.00 262144    0.00
              2     4    10.30.177.41  6202       sdd 100.00 262144    0.00

I start swift:

/etc/swift# swift-init all start
Starting container-updater...(/etc/swift/container-server.conf)
Starting account-auditor...(/etc/swift/account-server.conf)
Starting object-replicator...(/etc/swift/object-server.conf)
Starting proxy-server...(/etc/swift/proxy-server.conf)
Starting container-replicator...(/etc/swift/container-server.conf)
Starting object-auditor...(/etc/swift/object-server.conf)
Unable to locate config for object-expirer
Starting container-auditor...(/etc/swift/container-server.conf)
Starting container-server...(/etc/swift/container-server.conf)
Starting account-server...(/etc/swift/account-server.conf)
Starting account-reaper...(/etc/swift/account-server.conf)
Starting container-sync...(/etc/swift/container-server.conf)
Starting account-replicator...(/etc/swift/account-server.conf)
Starting object-updater...(/etc/swift/object-server.conf)
Starting object-server...(/etc/swift/object-server.conf)
Unable to find container-sync config section in 
/etc/swift/container-server.conf

I don't see binds to the ports I specified above, specifically 6000, 
6001, 6002, 6000, 6101, 6102, 6200, 6201, 6202:

/etc/swift# lsof -i :6000
COMMAND    PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
swift-obj 4320 swift    4u  IPv4  67230      0t0  TCP *:x11 (LISTEN)
swift-obj 4380 swift    4u  IPv4  67230      0t0  TCP *:x11 (LISTEN)
swift-obj 4381 swift    4u  IPv4  67230      0t0  TCP *:x11 (LISTEN)
swift-obj 4382 swift    4u  IPv4  67230      0t0  TCP *:x11 (LISTEN)
swift-obj 4383 swift    4u  IPv4  67230      0t0  TCP *:x11 (LISTEN)
swift-obj 4384 swift    4u  IPv4  67230      0t0  TCP *:x11 (LISTEN)
/etc/swift# lsof -i :6001
COMMAND    PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
swift-con 4308 swift    4u  IPv4  78900      0t0  TCP *:x11-1 (LISTEN)
swift-con 4365 swift    4u  IPv4  78900      0t0  TCP *:x11-1 (LISTEN)
swift-con 4366 swift    4u  IPv4  78900      0t0  TCP *:x11-1 (LISTEN)
swift-con 4367 swift    4u  IPv4  78900      0t0  TCP *:x11-1 (LISTEN)
swift-con 4368 swift    4u  IPv4  78900      0t0  TCP *:x11-1 (LISTEN)
swift-con 4369 swift    4u  IPv4  78900      0t0  TCP *:x11-1 (LISTEN)
/etc/swift# lsof -i :6002
COMMAND    PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
swift-acc 4311 swift    4u  IPv4  78119      0t0  TCP *:x11-2 (LISTEN)
swift-acc 4372 swift    4u  IPv4  78119      0t0  TCP *:x11-2 (LISTEN)
swift-acc 4374 swift    4u  IPv4  78119      0t0  TCP *:x11-2 (LISTEN)
swift-acc 4375 swift    4u  IPv4  78119      0t0  TCP *:x11-2 (LISTEN)
swift-acc 4376 swift    4u  IPv4  78119      0t0  TCP *:x11-2 (LISTEN)
swift-acc 4377 swift    4u  IPv4  78119      0t0  TCP *:x11-2 (LISTEN)
/etc/swift# lsof -i :6100
/etc/swift# lsof -i :6101
/etc/swift# lsof -i :6102
/etc/swift# lsof -i :6200
/etc/swift# lsof -i :6201
/etc/swift# lsof -i :6202

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:

/etc/swift# swauth-prep -K swauthkey -Ahttp://127.0.0.1:8080/auth
Traceback (most recent call last):
   File "/usr/bin/swauth-prep", line 56, in <module>
     ssl=(parsed.scheme == 'https'))
   File "/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py", 
line 175, in http_connect_raw
     conn.endheaders()
   File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
     self._send_output(message_body)
   File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
     self.send(msg)
   File "/usr/lib/python2.7/httplib.py", line 776, in send
     self.connect()
   File "/usr/lib/python2.7/dist-packages/swift/common/bufferedhttp.py", 
line 87, in connect
     return HTTPConnection.connect(self)
   File "/usr/lib/python2.7/httplib.py", line 757, in connect
     self.timeout, self.source_address)
   File "/usr/lib/python2.7/dist-packages/eventlet/green/socket.py", 
line 59, in create_connection
     raise error, msg
socket.error: [Errno 111] ECONNREFUSED

Can you point me in the right direction for why this isn't working as 
expected?

Regards,
-Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130816/5061663d/attachment.html>


More information about the Openstack mailing list