remove devices before min-part-hours requires --force
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Medium
|
Jethro Sun |
Bug Description
This script fails:
cd /tmp
rm test.builder
swift-ring-builder test.builder create 10 3 1
swift-ring-builder test.builder add r1z1-127.
swift-ring-builder test.builder add r1z1-127.
swift-ring-builder test.builder add r1z1-127.
swift-ring-builder test.builder add r1z1-127.
swift-ring-builder test.builder rebalance
swift-ring-builder test.builder remove d0
swift-ring-builder test.builder rebalance
The error is:
No partitions could be reassigned.
The time between rebalances must be at least min_part_hours: 1 hours (0:59:59 remaining)
Which seems contrary to the statement from the removal:
d0r1z1-
You can work around the issue, and get second rebalance that fails to remove the device with the --force option.
There seems to be a pre-rebalance check in the cli code, which seems to circumvent expected behavior (regression). At a minimum we could probably detect the builder has devices marked for removal and allow the rebalance to proceed. But it'd be better to leave this kind of validation in the Builder code and not have pre-rebalance checks like this in the cli code - i'm sure existing tests for the builder would have detected this sort of mistake but not all scenarios like this get hit through the rinbuilder cli tests.
description: | updated |
Changed in swift: | |
assignee: | nobody → Jethro Sun (shwsun) |
Changed in swift: | |
status: | New → Fix Released |
I just reproduced the bug. Working on it