osd: close the encrypted disk after cleanup is done

Once we are done cleaning up the content of the encrypted osd, let's
close the main LUKS device.
This avoids having dm devices on the system after the cleanup.

Closes: https://github.com/rook/rook/issues/10181
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 6ef491d9fc)
This commit is contained in:
Sébastien Han committed 2022-05-04 09:13:45 +02:00
1 parent 827abfa913
commit e1e89d5df2
7 files changed
+118 -58

No files matched your search

+10
View File
@@ -250,6 +250,16 @@ function wait_for_prepare_pod() {
kubectl -n rook-ceph describe deployment/rook-ceph-osd-0 || true
}
function wait_for_cleanup_pod() {
timeout 180 bash <<EOF
until kubectl --namespace rook-ceph logs job/cluster-cleanup-job-$(uname -n); do
echo "waiting for cleanup up pod to be present"
sleep 1
done
EOF
kubectl --namespace rook-ceph logs --follow job/cluster-cleanup-job-"$(uname -n)"
}
function wait_for_ceph_to_be_ready() {
DAEMONS=$1
OSD_COUNT=$2