Description of problem: Remove device operation should be allowed only for disabled/offline devices. Currently it allows any device to be removed which are in online state and there is no check as such for this maintenance operation. So we should introduce a check to have this operation permitted ONLY on disabled/offline devices. Version-Release number of selected component (if applicable): heketi-cli 4.0.0
patch in review. https://github.com/heketi/heketi/pull/710
Verified as fixed. ############# # heketi-cli device info 112158d6c384f01b7785446e84d66b6e Device Id: 112158d6c384f01b7785446e84d66b6e Name: /dev/sdf State: online Size (GiB): 15359 Used (GiB): 1 Free (GiB): 15358 Bricks: Id:c7cdf3886cb3db988438779e4ff6540e Size (GiB):1 Path: /var/lib/heketi/mounts/vg_112158d6c384f01b7785446e84d66b6e/brick_c7cdf3886cb3db988438779e4ff6540e/brick # heketi-cli device remove 112158d6c384f01b7785446e84d66b6e Error: Device must be offline before remove operation is performed, device:112158d6c384f01b7785446e84d66b6e #############
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1111