Well, the use-case I was describing was not to set min_part_hours to a bogus value to make it so you *can not* rebalance a ring - rather setting it really high to prevent moving parts that don't *need* to move.
There's some types of _gather_parts_* that *ignore* min_part_hours - so even with a value of min_part_hours 9999 you *can* still successfully gather and place parts with a rebalance command even when they've moved more recently than min_part_hours e.g. a device has failed!
I think it's a use-case worth considering. But I don't buy that we should let you set a min_part_hours to something that would prevent the rebalance command from even running - we should just not let you set that min_part_hours. If OTOH we *are* going to let the rebalance continue then a super high min_part_hours has a known (but unfortunately arcane and undocumented) utility!
Negative min_part_hours is never useful - and we should prevent it via set_min_part_hours same as in create - we could check it *again* in rebalance to deal with legacy rings. Little to argue about there I think.
But *only* checking min_part_hours in rebalance, i.e. letting the user set a bad value that will later prevent a rebalance seems actively user-hostile.
Well, the use-case I was describing was not to set min_part_hours to a bogus value to make it so you *can not* rebalance a ring - rather setting it really high to prevent moving parts that don't *need* to move.
There's some types of _gather_parts_* that *ignore* min_part_hours - so even with a value of min_part_hours 9999 you *can* still successfully gather and place parts with a rebalance command even when they've moved more recently than min_part_hours e.g. a device has failed!
I think it's a use-case worth considering. But I don't buy that we should let you set a min_part_hours to something that would prevent the rebalance command from even running - we should just not let you set that min_part_hours. If OTOH we *are* going to let the rebalance continue then a super high min_part_hours has a known (but unfortunately arcane and undocumented) utility!
Negative min_part_hours is never useful - and we should prevent it via set_min_part_hours same as in create - we could check it *again* in rebalance to deal with legacy rings. Little to argue about there I think.
But *only* checking min_part_hours in rebalance, i.e. letting the user set a bad value that will later prevent a rebalance seems actively user-hostile.