encryptors: Deprecate the CryptsetupEncryptor

This encryptor and the underlying plain cryptsetup encryption format it
provides is not widely used, inflexible (no key rotation) and as a
result no longer required in os-brick. This change starts the
deprecation process.

Additional changes will be posted to ensure the retype workflow between
this encryptor and the LUKS based encryptors is well tested ahead of any
removal.

Change-Id: Ibb560da269a2f330526af6761fa509c262e3d361
This commit is contained in:
Lee Yarwood 2019-06-30 11:20:39 +01:00 committed by Eric Harney
parent 1c02d525bb
commit b3e5aa3761
2 changed files with 17 additions and 0 deletions

View File

@ -22,6 +22,7 @@ from os_brick.encryptors import base
from os_brick import exception
from oslo_concurrency import processutils
from oslo_log import log as logging
from oslo_log import versionutils
LOG = logging.getLogger(__name__)
@ -146,6 +147,15 @@ class CryptsetupEncryptor(base.VolumeEncryptor):
instance is unaware of the underlying encryption due to modifying the
original symbolic link to refer to the device mounted by dm-crypt.
"""
# TODO(lyarwood): Remove this encryptor and refactor the LUKS based
# encryptors in the U release.
versionutils.report_deprecated_feature(
LOG,
"The plain CryptsetupEncryptor is deprecated and will be removed "
"in a future release. Existing users are encouraged to retype "
"any existing volumes using this encryptor to the 'luks' "
"LuksEncryptor or 'luks2' Luks2Encryptor encryptors as soon as "
"possible.")
key = self._get_key(context).get_encoded()
passphrase = self._get_passphrase(key)

View File

@ -0,0 +1,7 @@
---
deprecations:
- |
The plain CryptsetupEncryptor is deprecated and will be removed in a future
release. Existing users are encouraged to retype any existing volumes using
this encryptor to the luks LuksEncryptor or luks2 Luks2Encryptor encryptors
as soon as possible