Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A "swift-ring-builder *.builder rebalance" issue

Hi everyone.

I'm trying to build a little Swift Infrastructure from this tutorial : http://docs.openstack.org/openstack-object-storage/admin/os-objectstorage-admin-book.pdf

Actually i have 3 VMs: - Proxy Node - Authentication Node - Storage Node with : 4 logical partitions : /dev/sda5, /dev/sda6, /dev/sda7, /dev/sda8

In the 7th step of how configuring a Proxy Node, i added the ressources this way :

swift-ring-builder account.builder create 18 3 1 swift-ring-builder account.builder add z1-192.168.1.18:6001/sda5 100 swift-ring-builder account.builder add z1-192.168.1.18:6002/sda6 100 swift-ring-builder account.builder add z1-192.168.1.18:6003/sda7 100 swift-ring-builder account.builder add z1-192.168.1.18:6004/sda8 100 swift-ring-builder container.builder create 18 3 1 swift-ring-builder container.builder add z1-192.168.1.18:6011/sda5 100 swift-ring-builder container.builder add z1-192.168.1.18:6012/sda6 100 swift-ring-builder container.builder add z1-192.168.1.18:6013/sda7 100 swift-ring-builder container.builder add z1-192.168.1.18:6014/sda8 100 swift-ring-builder object.builder create 18 3 1 swift-ring-builder object.builder add z1-192.168.1.18:6021/sda5 100 swift-ring-builder object.builder add z1-192.168.1.18:6022/sda6 100 swift-ring-builder object.builder add z1-192.168.1.18:6023/sda7 100 swift-ring-builder object.builder add z1-192.168.1.18:6024/sda8 100

Here is the result :

swift-ring-builder object.builder

object.builder, build version 4 262144 partitions, 3 replicas, 1 zones, 4 devices, 100.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 1 192.168.1.18 6021 sda5 100.00 0 -100.00 1 1 192.168.1.18 6022 sda6 100.00 0 -100.00 2 1 192.168.1.18 6023 sda7 100.00 0 -100.00 3 1 192.168.1.18 6024 sda8 100.00 0 -100.00

swift-ring-builder container.builder

container.builder, build version 4 262144 partitions, 3 replicas, 1 zones, 4 devices, 100.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 1 192.168.1.18 6011 sda5 100.00 0 -100.00 1 1 192.168.1.18 6012 sda6 100.00 0 -100.00 2 1 192.168.1.18 6013 sda7 100.00 0 -100.00 3 1 192.168.1.18 6014 sda8 100.00 0 -100.00

swift-ring-builder account.builder

account.builder, build version 4 262144 partitions, 3 replicas, 1 zones, 4 devices, 100.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 1 192.168.1.18 6001 sda5 100.00 0 -100.00 1 1 192.168.1.18 6002 sda6 100.00 0 -100.00 2 1 192.168.1.18 6003 sda7 100.00 0 -100.00 3 1 192.168.1.18 6004 sda8 100.00 0 -100.00

But when i try to rebalance the ring, i got those errors :

swift-ring-builder account.builder rebalance

Traceback (most recent call last): File "/usr/bin/swift-ring-builder", line 571, in <module> Commands.__dict__.get(command, Commands.unknown)() File "/usr/bin/swift-ring-builder", line 443, in rebalance parts, balance = builder.rebalance() File "/usr/lib/pymodules/python2.6/swift/common/ring/builder.py", line 200, in rebalance self._initial_balance() File "/usr/lib/pymodules/python2.6/swift/common/ring/builder.py", line 351, in _initial_balance while available_devs[index]['zone'] in other_zones: IndexError: list index out of range

swift-ring-builder container.builder rebalance

Traceback (most recent call last): File "/usr/bin/swift-ring-builder", line 571, in <module> Commands.__dict__.get(command, Commands.unknown)() File "/usr/bin/swift-ring-builder", line 443, in rebalance parts, balance = builder.rebalance() File "/usr/lib/pymodules/python2.6/swift/common/ring/builder.py", line 200, in rebalance self._initial_balance() File "/usr/lib/pymodules/python2.6/swift/common/ring/builder.py", line 351, in _initial_balance while available_devs[index]['zone'] in other_zones: IndexError: list index out of range

swift-ring-builder object.builder rebalance

Traceback (most recent call last): File "/usr/bin/swift-ring-builder", line 571, in <module> Commands.__dict__.get(command, Commands.unknown)() File "/usr/bin/swift-ring-builder", line 443, in rebalance parts, balance = builder.rebalance() File "/usr/lib/pymodules/python2.6/swift/common/ring/builder.py", line 200, in rebalance self._initial_balance() File "/usr/lib/pymodules/python2.6/swift/common/ring/builder.py", line 351, in _initial_balance while available_devs[index]['zone'] in other_zones: IndexError: list index out of range

Does anyone know why i can't rebalance the ring please?

Thanks.