From 0cfb2b012b1367b59dd834f7dcd0a20e61e5581f Mon Sep 17 00:00:00 2001 From: Praveen M Date: Fri, 17 Jan 2025 10:31:00 +0530 Subject: [PATCH] rbd: correct default encryption type Problem: When the encryptionType is not specified in the StorageClass, the default type (block) is used and stored in OMAP. However, during OMAP regeneration in a secondary cluster, the default type is incorrectly set to none. This discrepancy leads to errors during PVC cloning, with the message: `cannot create encrypted volume from unencrypted volume.` Solution: Update the default encryption type to consistently use block instead of none. Signed-off-by: Praveen M --- internal/rbd/rbd_journal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rbd/rbd_journal.go b/internal/rbd/rbd_journal.go index 8827f5c7d..c8e1fd3e1 100644 --- a/internal/rbd/rbd_journal.go +++ b/internal/rbd/rbd_journal.go @@ -599,7 +599,7 @@ func RegenerateJournal( rbdVol.Owner = owner - kmsID, encryptionType, err = ParseEncryptionOpts(volumeAttributes, util.EncryptionTypeNone) + kmsID, encryptionType, err = ParseEncryptionOpts(volumeAttributes, rbdDefaultEncryptionType) if err != nil { return "", err }