Browse Source

Merge "Fix rekeying volume with legacy encryption provider"

changes/69/744069/1
Zuul 1 week ago
committed by Gerrit Code Review
parent
commit
52a08881e5
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      cinder/tests/unit/test_volume_utils.py
  2. +1
    -0
      cinder/volume/volume_utils.py

+ 1
- 0
cinder/tests/unit/test_volume_utils.py View File

@@ -1175,6 +1175,7 @@ class VolumeUtilsTestCase(test.TestCase):
volume,
mock.sentinel.context)
self.assertEqual('aes-xts-plain64', ret['cipher'])
self.assertEqual('luks', ret['provider'])

def test_check_encryption_provider_invalid(self):
encryption_metadata = {'cipher': 'aes-xts-plain64',


+ 1
- 0
cinder/volume/volume_utils.py View File

@@ -1191,6 +1191,7 @@ def check_encryption_provider(db, volume, context):
provider = encryption['provider']
if provider in encryptors.LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP:
provider = encryptors.LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP[provider]
encryption['provider'] = provider
if provider != encryptors.LUKS:
message = _("Provider %s not supported.") % provider
raise exception.VolumeDriverException(message=message)


Loading…
Cancel
Save