mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 06:10:22 +00:00
rbd: remove deprecated rbdImageRequiresEncryption
remove support for deprecated rbdImageRequiresEncryption case. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
1e05a0da7c
commit
9f753889ed
@ -48,12 +48,6 @@ const (
|
|||||||
// with cryptsetup before updating the state to `rbdImageEncrypted`.
|
// with cryptsetup before updating the state to `rbdImageEncrypted`.
|
||||||
rbdImageEncryptionPrepared = rbdEncryptionState("encryptionPrepared")
|
rbdImageEncryptionPrepared = rbdEncryptionState("encryptionPrepared")
|
||||||
|
|
||||||
// rbdImageRequiresEncryption has been deprecated, it is used only for
|
|
||||||
// volumes that have been created with an old provisioner, were never
|
|
||||||
// attached/mounted and now get staged by a new node-plugin
|
|
||||||
// TODO: remove this backwards compatibility support.
|
|
||||||
rbdImageRequiresEncryption = rbdEncryptionState("requiresEncryption")
|
|
||||||
|
|
||||||
// image metadata key for encryption.
|
// image metadata key for encryption.
|
||||||
encryptionMetaKey = "rbd.csi.ceph.com/encrypted"
|
encryptionMetaKey = "rbd.csi.ceph.com/encrypted"
|
||||||
oldEncryptionMetaKey = ".rbd.csi.ceph.com/encrypted"
|
oldEncryptionMetaKey = ".rbd.csi.ceph.com/encrypted"
|
||||||
|
@ -1234,23 +1234,6 @@ func (ns *NodeServer) processEncryptedDevice(
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case encrypted == rbdImageRequiresEncryption:
|
|
||||||
// If we get here, it means the image was created with a
|
|
||||||
// ceph-csi version that creates a passphrase for the encrypted
|
|
||||||
// device in NodeStage. New versions moved that to
|
|
||||||
// CreateVolume.
|
|
||||||
// Use the same setupEncryption() as CreateVolume does, and
|
|
||||||
// continue with the common process to crypt-format the device.
|
|
||||||
err = volOptions.setupBlockEncryption(ctx)
|
|
||||||
if err != nil {
|
|
||||||
log.ErrorLog(ctx, "failed to setup encryption for rbd"+
|
|
||||||
"image %s: %v", imageSpec, err)
|
|
||||||
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
// make sure we continue with the encrypting of the device
|
|
||||||
fallthrough
|
|
||||||
case encrypted == rbdImageEncryptionPrepared:
|
case encrypted == rbdImageEncryptionPrepared:
|
||||||
diskMounter := &mount.SafeFormatAndMount{Interface: ns.Mounter, Exec: utilexec.New()}
|
diskMounter := &mount.SafeFormatAndMount{Interface: ns.Mounter, Exec: utilexec.New()}
|
||||||
// TODO: update this when adding support for static (pre-provisioned) PVs
|
// TODO: update this when adding support for static (pre-provisioned) PVs
|
||||||
|
Loading…
Reference in New Issue
Block a user