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 <m.praveen@ibm.com>
This commit is contained in:
Praveen M 2025-01-17 10:31:00 +05:30 committed by mergify[bot]
parent d996439b30
commit 0cfb2b012b

View File

@ -599,7 +599,7 @@ func RegenerateJournal(
rbdVol.Owner = owner rbdVol.Owner = owner
kmsID, encryptionType, err = ParseEncryptionOpts(volumeAttributes, util.EncryptionTypeNone) kmsID, encryptionType, err = ParseEncryptionOpts(volumeAttributes, rbdDefaultEncryptionType)
if err != nil { if err != nil {
return "", err return "", err
} }