From 192bf512a1da3ec5b26cc3bc28065c8f8f956492 Mon Sep 17 00:00:00 2001 From: Yuma Ogami Date: Wed, 28 Feb 2024 08:33:08 +0000 Subject: [PATCH] osd: delete the key file deletion in encryption open init containers The key file deletion process is in the shell script commonly used by all of encryption-open, encryption-open-metadata, and encryption-open-wal init containers. The key file is deleted at the encryption-open init container and encryption-open-metadata and encryption-open-wal init containers are failed to open the key file. The key file is in the /etc/ceph folder. Unless that folder is shared, the key file anyway won't be available in the other init containers even if it is not deleted by these init containers. And it will naturally anyway be deleted after the init containers are completed. So The key file deletion process in shell scripts is unnecessary. Fixes: #13737 Signed-off-by: Yuma Ogami (cherry picked from commit cdd655ed3f257a0a008315ac1364c66fc8130ec6) --- pkg/operator/ceph/cluster/osd/spec.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/operator/ceph/cluster/osd/spec.go b/pkg/operator/ceph/cluster/osd/spec.go index d7ca5b12b..7f96c8ea2 100644 --- a/pkg/operator/ceph/cluster/osd/spec.go +++ b/pkg/operator/ceph/cluster/osd/spec.go @@ -224,7 +224,6 @@ dmsetup version function open_encrypted_block { echo "Opening encrypted device $BLOCK_PATH at $DM_PATH" cryptsetup luksOpen --verbose --disable-keyring --allow-discards --key-file "$KEY_FILE_PATH" "$BLOCK_PATH" "$DM_NAME" - rm -f "$KEY_FILE_PATH" } # This is done for upgraded clusters that did not have the subsystem and label set by the prepare job