rbd: Handle encryption type default at a more meaningful place

Different places have different meaningful fallback. When parsing
from user we should default to block, when parsing stored config we
should default to invalid and handle that as an error.

Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>
This commit is contained in:
Marcel Lauhoff
2022-08-04 17:15:52 +02:00
committed by mergify[bot]
parent 1fa842277a
commit a7ea12eb8e
2 changed files with 5 additions and 4 deletions

View File

@ -568,7 +568,7 @@ func RegenerateJournal(
rbdVol.Owner = owner
kmsID, _, err = ParseEncryptionOpts(ctx, volumeAttributes)
kmsID, encryptionType, err = ParseEncryptionOpts(ctx, volumeAttributes, util.EncryptionTypeInvalid)
if err != nil {
return "", err
}