Merge "PowerMax Driver - Promotion RDF Group number fix"

This commit is contained in:
Zuul 2021-03-24 01:24:00 +00:00 committed by Gerrit Code Review
commit ee3d2928d6
3 changed files with 23 additions and 1 deletions

View File

@ -496,6 +496,20 @@ class PowerMaxReplicationTest(test.TestCase):
extra_specs1, rep_config)
self.assertEqual(ref_specs2, rep_extra_specs2)
@mock.patch.object(common.PowerMaxCommon, 'get_rdf_details',
return_value=(1, True))
@mock.patch.object(rest.PowerMaxRest,
'get_array_model_info',
return_value=('VMAX250F', False))
def test_get_replication_extra_specs_get_rdf_group_promotion(
self, mock_model, mck_rdf):
self.common.promotion = True
remote_array = self.data.remote_array
rep_config = self.data.rep_config_sync
extra_specs1 = deepcopy(self.extra_specs)
self.common._get_replication_extra_specs(extra_specs1, rep_config)
mck_rdf.assert_called_with(remote_array, rep_config)
@mock.patch.object(rest.PowerMaxRest,
'get_array_model_info',
return_value=('PowerMax 2000', True))

View File

@ -5399,9 +5399,11 @@ class PowerMaxCommon(object):
rep_extra_specs[utils.PORTGROUPNAME] = rep_config['portgroup']
# Get the RDF Group label & number
array = (rep_config[utils.ARRAY] if self.promotion else
extra_specs[utils.ARRAY])
rep_extra_specs['rdf_group_label'] = rep_config['rdf_group_label']
rdf_group_no, __ = self.get_rdf_details(
extra_specs['array'], rep_config)
array, rep_config)
rep_extra_specs['rdf_group_no'] = rdf_group_no
# Get the SRDF wait/retries settings
rep_extra_specs['sync_retries'] = rep_config['sync_retries']

View File

@ -0,0 +1,6 @@
---
fixes:
- |
PowerMax Driver - Promotion RDF Group number fix uses remote array
SID when finding rdf group number when performing retype during
failover.