forked from rook/rook
During osd-prepare-job, The encrypted device is found to be closed in some cases when the OSD deployment has been removed manually accompanied by any of following cases: - node reboot - csi managed PVC being unmounted etc while re-opening the block to re-hydrate the OSDInfo, the dm device `<pvc-name>-block-dmcrypt` clashes with the one used by OSD pod which is stale by now. This commit adds cmd to remove this stale dm device. Error with output "No such device" is ignored. Signed-off-by: Rakshith R <rar@redhat.com>