rbd: encrypted volumes can be of type "crypto_LUKS" too

It seems that newer versions of some tools/libraries identify encrypted
filesystems with `crypto_LUKS` instead of `crypt`.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2021-04-01 16:08:44 +02:00 committed by mergify[bot]
parent d7838defcf
commit aaeb35eceb

View File

@ -823,7 +823,7 @@ func (ns *NodeServer) processEncryptedDevice(ctx context.Context, volOptions *rb
if err != nil { if err != nil {
return "", fmt.Errorf("failed to encrypt rbd image %s: %w", imageSpec, err) return "", fmt.Errorf("failed to encrypt rbd image %s: %w", imageSpec, err)
} }
case "crypt": case "crypt", "crypto_LUKS":
util.WarningLog(ctx, "rbd image %s is encrypted, but encryption state was not updated", util.WarningLog(ctx, "rbd image %s is encrypted, but encryption state was not updated",
imageSpec) imageSpec)
err = volOptions.ensureEncryptionMetadataSet(rbdImageEncrypted) err = volOptions.ensureEncryptionMetadataSet(rbdImageEncrypted)