Merge "PowerMax Driver - Live migrate remove rep vol from sg" into stable/ussuri

This commit is contained in:
Zuul 2020-06-21 17:44:09 +00:00 committed by Gerrit Code Review
commit 5062645c95
6 changed files with 34 additions and 3 deletions

View File

@ -138,7 +138,8 @@ class PowerMaxData(object):
'is_multipath': True, 'is_multipath': True,
'array': array, 'array': array,
'controller': {'host': '10.00.00.00'}, 'controller': {'host': '10.00.00.00'},
'hostlunid': 3} 'hostlunid': 3,
'device_id': device_id}
iscsi_device_info_metro = deepcopy(iscsi_device_info) iscsi_device_info_metro = deepcopy(iscsi_device_info)
iscsi_device_info_metro['metro_ip_and_iqn'] = [{'ip': ip2, 'iqn': iqn2}] iscsi_device_info_metro['metro_ip_and_iqn'] = [{'ip': ip2, 'iqn': iqn2}]
iscsi_device_info_metro['metro_hostlunid'] = 2 iscsi_device_info_metro['metro_hostlunid'] = 2

View File

@ -543,6 +543,32 @@ class PowerMaxCommonTest(test.TestCase):
self.assertEqual(0, mck_remove.call_count) self.assertEqual(0, mck_remove.call_count)
self.assertEqual(1, mck_info.call_count) self.assertEqual(1, mck_info.call_count)
@mock.patch.object(provision.PowerMaxProvision, 'verify_slo_workload')
@mock.patch.object(common.PowerMaxCommon, '_remove_members')
@mock.patch.object(common.PowerMaxCommon, 'find_host_lun_id',
return_value=(tpd.PowerMaxData.iscsi_device_info,
False))
@mock.patch.object(
common.PowerMaxCommon, '_get_replication_extra_specs',
return_value=tpd.PowerMaxData.rep_extra_specs_rep_config)
@mock.patch.object(
common.PowerMaxCommon, '_initial_setup',
return_value=tpd.PowerMaxData.rep_extra_specs_rep_config)
def test_unmap_lun_replication_force_flag(
self, mck_setup, mck_rep, mck_find, mck_rem, mck_slo):
volume = deepcopy(self.data.test_volume)
connector = deepcopy(self.data.connector)
device_info = self.data.provider_location['device_id']
volume.volume_attachment.objects = [
deepcopy(self.data.test_volume_attachment)]
extra_specs = deepcopy(self.data.rep_extra_specs_rep_config)
array = extra_specs[utils.ARRAY]
extra_specs[utils.FORCE_VOL_REMOVE] = True
self.common._unmap_lun(volume, connector)
mck_rem.assert_called_once_with(array, volume, device_info,
extra_specs, connector, False,
async_grp=None, host_template=None)
def test_initialize_connection_already_mapped(self): def test_initialize_connection_already_mapped(self):
volume = self.data.test_volume volume = self.data.test_volume
connector = self.data.connector connector = self.data.connector

View File

@ -106,6 +106,7 @@ class PowerMaxReplicationTest(test.TestCase):
extra_specs = deepcopy(self.extra_specs) extra_specs = deepcopy(self.extra_specs)
extra_specs[utils.PORTGROUPNAME] = self.data.port_group_name_f extra_specs[utils.PORTGROUPNAME] = self.data.port_group_name_f
extra_specs[utils.IS_RE] = True extra_specs[utils.IS_RE] = True
extra_specs[utils.FORCE_VOL_REMOVE] = True
rep_config = self.data.rep_config_sync rep_config = self.data.rep_config_sync
rep_config[utils.RDF_CONS_EXEMPT] = False rep_config[utils.RDF_CONS_EXEMPT] = False
extra_specs[utils.REP_CONFIG] = rep_config extra_specs[utils.REP_CONFIG] = rep_config

View File

@ -751,6 +751,7 @@ class PowerMaxCommon(object):
backend_id = self._get_replicated_volume_backend_id(volume) backend_id = self._get_replicated_volume_backend_id(volume)
rep_config = self.utils.get_rep_config( rep_config = self.utils.get_rep_config(
backend_id, self.rep_configs) backend_id, self.rep_configs)
extra_specs[utils.FORCE_VOL_REMOVE] = True
rep_extra_specs = self._get_replication_extra_specs( rep_extra_specs = self._get_replication_extra_specs(
extra_specs, rep_config) extra_specs, rep_config)
if self.utils.is_volume_failed_over(volume): if self.utils.is_volume_failed_over(volume):

View File

@ -124,9 +124,10 @@ class PowerMaxFCDriver(san.SanDriver, driver.FibreChannelDriver):
- Pools bug fix allowing 'None' variants (bug #1873253) - Pools bug fix allowing 'None' variants (bug #1873253)
4.2.1 - Concurrent live migrations failure (bug #1875478) 4.2.1 - Concurrent live migrations failure (bug #1875478)
4.2.2 - U4P failover lock not released on exception (#1875640) 4.2.2 - U4P failover lock not released on exception (#1875640)
4.2.3 - Live migrate remove rep vol from sg (bug #1875432)
""" """
VERSION = "4.2.2" VERSION = "4.2.3"
# ThirdPartySystems wiki # ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI" CI_WIKI_NAME = "EMC_VMAX_CI"

View File

@ -129,9 +129,10 @@ class PowerMaxISCSIDriver(san.SanISCSIDriver):
- Pools bug fix allowing 'None' variants (bug #1873253) - Pools bug fix allowing 'None' variants (bug #1873253)
4.2.1 - Concurrent live migrations failure (bug #1875478) 4.2.1 - Concurrent live migrations failure (bug #1875478)
4.2.2 - U4P failover lock not released on exception (#1875640) 4.2.2 - U4P failover lock not released on exception (#1875640)
4.2.3 - Live migrate remove rep vol from sg (bug #1875432)
""" """
VERSION = "4.2.2" VERSION = "4.2.3"
# ThirdPartySystems wiki # ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI" CI_WIKI_NAME = "EMC_VMAX_CI"