diff --git a/cinder/tests/unit/volume/drivers/dell_emc/powermax/powermax_data.py b/cinder/tests/unit/volume/drivers/dell_emc/powermax/powermax_data.py index c9e3444b21d..b81e796062f 100644 --- a/cinder/tests/unit/volume/drivers/dell_emc/powermax/powermax_data.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/powermax/powermax_data.py @@ -419,6 +419,13 @@ class PowerMaxData(object): 'array': array, 'interval': 3, 'retries': 120} + extra_specs_no_pool_name = { + 'slo': slo, + 'workload': workload, + 'srp': srp, + 'array': array, + 'interval': 3, + 'retries': 120} extra_specs_optimized = { 'pool_name': u'Optimized+None+SRP_1+000197800123', 'slo': 'Optimized', 'workload': 'None', diff --git a/cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_masking.py b/cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_masking.py index 5446765392b..75859b11412 100644 --- a/cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_masking.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_masking.py @@ -1216,6 +1216,23 @@ class PowerMaxMaskingTest(test.TestCase): utils.PowerMaxUtils.truncate_string.assert_called_once_with( 'OptimizedNONE', 10) + @mock.patch.object(masking.PowerMaxMasking, + '_clean_up_child_storage_group') + @mock.patch.object(masking.PowerMaxMasking, + 'move_volume_between_storage_groups') + @mock.patch.object(masking.PowerMaxMasking, + '_return_volume_to_fast_managed_group') + def test_pre_multiattach_pool_no_pool_name(self, mock_return, mck_move, + mck_clean): + with mock.patch.object(utils.PowerMaxUtils, 'truncate_string', + return_value='DiamondDSS'): + self.mask.pre_multiattach( + self.data.array, self.data.device_id, + self.data.masking_view_dict_multiattach, + self.data.extra_specs_no_pool_name) + utils.PowerMaxUtils.truncate_string.assert_called_once_with( + 'DiamondDSS', 10) + @mock.patch.object( rest.PowerMaxRest, 'get_storage_group_list', side_effect=[ diff --git a/cinder/volume/drivers/dell_emc/powermax/masking.py b/cinder/volume/drivers/dell_emc/powermax/masking.py index 159551f11ae..0594633c353 100644 --- a/cinder/volume/drivers/dell_emc/powermax/masking.py +++ b/cinder/volume/drivers/dell_emc/powermax/masking.py @@ -2040,9 +2040,13 @@ class PowerMaxMasking(object): if 'STG-' in storage_group_list[0]: return mv_dict - split_pool = extra_specs['pool_name'].split('+') - src_slo = split_pool[0] - src_wl = split_pool[1] if len(split_pool) == 4 else 'NONE' + if 'pool_name' in extra_specs: + split_pool = extra_specs['pool_name'].split('+') + src_slo = split_pool[0] + src_wl = split_pool[1] if len(split_pool) == 4 else 'NONE' + else: + src_slo = extra_specs[utils.SLO] + src_wl = extra_specs[utils.WORKLOAD] slo_wl_combo = self.utils.truncate_string(src_slo + src_wl.upper(), 10) for sg in sg_list.get('storageGroupId', []): if slo_wl_combo in sg: diff --git a/releasenotes/notes/add-powermax-live-migration-without-a-pool-name-7690fcd67b5f690c.yaml b/releasenotes/notes/add-powermax-live-migration-without-a-pool-name-7690fcd67b5f690c.yaml new file mode 100644 index 00000000000..0c18040acaa --- /dev/null +++ b/releasenotes/notes/add-powermax-live-migration-without-a-pool-name-7690fcd67b5f690c.yaml @@ -0,0 +1,10 @@ +--- +fixes: + - | + Dell PowerMax driver `bug #2034937 + `_: Fixed + + This change is to update the live migration ability in environments using PowerMax. In previous + 2023.1 version, the live migration fails without a pool name. + This update add the ability of live migration without a pool name. +