Skip to content

Commit

Permalink
rbd: correct default encryption type
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
iPraveenParihar committed Jan 17, 2025
1 parent d996439 commit 24ea1b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/rbd/rbd_journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 24ea1b1

Please sign in to comment.