diff --git a/cinder/tests/unit/test_volume.py b/cinder/tests/unit/test_volume.py index c7d2d5e4ecb..244ce2a46a7 100644 --- a/cinder/tests/unit/test_volume.py +++ b/cinder/tests/unit/test_volume.py @@ -5302,7 +5302,11 @@ class VolumeMigrationTestCase(BaseVolumeTestCase): mock.patch.object(db.sqlalchemy.api, 'volume_get') as mock_get: mock_get.return_value = volume _retype.return_value = driver - returned_diff = {} + returned_diff = { + 'encryption': {}, + 'qos_specs': {}, + 'extra_specs': {}, + } if encryption_changed: returned_diff = {'encryption': 'fake'} _diff.return_value = (returned_diff, diff_equal) diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 90b8175d3ee..c45632a7f6c 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -2287,7 +2287,7 @@ class VolumeManager(manager.SchedulerDependentManager): # We assume that those that support pools do this internally # so we strip off the pools designation if (not retyped and - diff.get('encryption') is None and + not diff.get('encryption') and vol_utils.hosts_are_equivalent(self.driver.host, host['host'])): try: