missing error message when rebalancing a ring with more replicas than available zones
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Andy McCrae |
Bug Description
I think it should be checked if replicas <= zones before starting the rebalancing and then there should be printed a correct error message.
os0020:/etc/swift # swift-ring-builder account.builder create 18 3 1
os0020:/etc/swift # swift-ring-builder account.builder
account.builder, build version 2
262144 partitions, 3 replicas, 2 zones, 2 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 172.19.13.30 6002 xvdb1 100.00 0 -100.00
1 2 172.19.13.31 6002 xvdb1 100.00 0 -100.00
os0020:/etc/swift # swift-ring-builder account.builder rebalance
Traceback (most recent call last):
File "/usr/bin/
Commands.
File "/usr/bin/
parts, balance = builder.rebalance()
File "/usr/lib64/
self.
File "/usr/lib64/
while available_
IndexError: list index out of range
Changed in swift: | |
status: | New → Confirmed |
Changed in swift: | |
assignee: | nobody → Andy McCrae (andrew-mccrae) |
Changed in swift: | |
status: | Fix Released → Fix Committed |
Changed in swift: | |
milestone: | none → 1.5.0 |
status: | Fix Committed → Fix Released |
FYI, there's a pending patchset (https:/ /review. openstack. org/6845) that, if it gets accepted, would fix this by removing the zones >= replicas restriction.