Merge "Hitachi: Fix to have compatibility of GAD volumes"

This commit is contained in:
Zuul
2025-07-07 22:22:27 +00:00
committed by Gerrit Code Review
3 changed files with 22 additions and 2 deletions

View File

@@ -495,7 +495,7 @@ GET_REMOTE_MIRROR_COPYPAIR_RESULT_SPLIT = {
}
GET_REMOTE_MIRROR_COPYGROUP_RESULT = {
'copyGroupName': 'HBSD-127.0.0.100U00',
'copyGroupName': 'HBSD-127.0.0.100G00',
'copyPairs': [GET_REMOTE_MIRROR_COPYPAIR_RESULT],
}
@@ -889,6 +889,12 @@ class HBSDMIRRORFCDriverTest(test.TestCase):
'remote-copy': hbsd_utils.MIRROR_ATTR})}
self.assertEqual(actual, ret)
self.assertEqual(14, request.call_count)
for args, kwargs in request.call_args_list:
if args[0] == 'POST' and 'remote-mirror-copypairs' in args[1]:
self.assertEqual('G', kwargs['json']['copyGroupName'][-3])
break
else:
self.fail('no create pair api')
@mock.patch.object(requests.Session, "request")
@mock.patch.object(volume_types, 'get_volume_type_extra_specs')

View File

@@ -387,7 +387,7 @@ class HBSDREPLICATION(rest.HBSDREST):
return pvol, svol
def _create_rep_copy_group_name(self, ldev):
return self.driver_info['target_prefix'] + '%s%02XU%02d' % (
return self.driver_info['target_prefix'] + '%s%02XG%02d' % (
CONF.my_ip, self.conf.hitachi_replication_number, ldev >> 10)
def _get_rep_copy_speed(self):

View File

@@ -0,0 +1,14 @@
---
fixes:
- |
Hitachi driver `bug #2043978
<https://bugs.launchpad.net/cinder/+bug/2043978>`_: Since around the Train
era, Hitachi had an out-of-tree driver that implemented the Global-Active
Device (GAD) and Remote Replication features. As part of an initiative to
unify the "Enterprise" and in-tree drivers, change I4543cd036897 in the
2023.1 (Antelope) release implemented the GAD feature for the in-tree
driver. Unfortunately, this change used an incompatible string to indicate
what copy groups were under GAD control, and thus upgrading to the in-tree
driver breaks GAD for existing volumes. This bug fix makes the copy group
control identifier consistent so that current users of the out-of-tree
driver can upgrade to releases that contain the in-tree driver.