Merge "PowerMax Driver - Promotion RDF Group number fix" into stable/victoria

This commit is contained in:
Zuul 2021-04-13 21:57:14 +00:00 committed by Gerrit Code Review
commit e3d5393352
3 changed files with 23 additions and 1 deletions

View File

@ -494,6 +494,20 @@ class PowerMaxReplicationTest(test.TestCase):
extra_specs1, rep_config) extra_specs1, rep_config)
self.assertEqual(ref_specs2, rep_extra_specs2) 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, @mock.patch.object(rest.PowerMaxRest,
'get_array_model_info', 'get_array_model_info',
return_value=('PowerMax 2000', True)) return_value=('PowerMax 2000', True))

View File

@ -5386,9 +5386,11 @@ class PowerMaxCommon(object):
rep_extra_specs[utils.PORTGROUPNAME] = rep_config['portgroup'] rep_extra_specs[utils.PORTGROUPNAME] = rep_config['portgroup']
# Get the RDF Group label & number # 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'] rep_extra_specs['rdf_group_label'] = rep_config['rdf_group_label']
rdf_group_no, __ = self.get_rdf_details( rdf_group_no, __ = self.get_rdf_details(
extra_specs['array'], rep_config) array, rep_config)
rep_extra_specs['rdf_group_no'] = rdf_group_no rep_extra_specs['rdf_group_no'] = rdf_group_no
# Get the SRDF wait/retries settings # Get the SRDF wait/retries settings
rep_extra_specs['sync_retries'] = rep_config['sync_retries'] 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.