We should probably check blockdevs on create_pool as we do for add_blockdevs
Closed this issue · 1 comments
This will bring the create pool action more into alignment with the add_blockdevs action.
Additionally, we realized that there were two distinctions that we weren't making quite properly for add_blockdevs
:
-
In
_check_opposite_tier
we always return anInUse
error if the blockdev is in use, which is correct. But thatInUse
error should contain information about what pool is using the device and it doesn't, which is potentially confusing for the user. -
In
_check_same_tier
we always returnPartialChange
. This is only correct if the device is in use in the same pool. If it is in use in a different pool, we should returnInUse
error instead.
In both cases, we still refuse to perform the action and show an error, correctly. The proposed change would improve the error messages that the user sees.