diff --git a/cinder/tests/unit/test_dellscapi.py b/cinder/tests/unit/test_dellscapi.py index 3c9ac3bb960..d24bdcf7c9a 100644 --- a/cinder/tests/unit/test_dellscapi.py +++ b/cinder/tests/unit/test_dellscapi.py @@ -6100,7 +6100,6 @@ class DellSCSanAPITestCase(test.TestCase): 'StorageCenter': ssn, 'ReplicateActiveReplay': False, 'Type': 'Asynchronous', - 'SyncMode': 'HighAvailability', 'DestinationVolumeAttributes': {'CreateSourceVolumeFolderPath': True, 'Notes': notes, @@ -6116,6 +6115,7 @@ class DellSCSanAPITestCase(test.TestCase): self.assertDictEqual(self.SCREPL[0], ret) payload['Type'] = 'Synchronous' payload['ReplicateActiveReplay'] = True + payload['SyncMode'] = 'HighAvailability' ret = self.scapi.create_replication(self.VOLUME, str(destssn), qosnode, @@ -6166,7 +6166,6 @@ class DellSCSanAPITestCase(test.TestCase): 'StorageCenter': ssn, 'ReplicateActiveReplay': False, 'Type': 'Asynchronous', - 'SyncMode': 'HighAvailability', 'DestinationVolumeAttributes': {'CreateSourceVolumeFolderPath': True, 'Notes': notes, @@ -6183,6 +6182,7 @@ class DellSCSanAPITestCase(test.TestCase): payload['Type'] = 'Synchronous' payload['ReplicateActiveReplay'] = True + payload['SyncMode'] = 'HighAvailability' ret = self.scapi.create_replication(self.VOLUME, str(destssn), qosnode, diff --git a/cinder/volume/drivers/dell/dell_storagecenter_api.py b/cinder/volume/drivers/dell/dell_storagecenter_api.py index 5297cf19abe..8ba7d85990d 100644 --- a/cinder/volume/drivers/dell/dell_storagecenter_api.py +++ b/cinder/volume/drivers/dell/dell_storagecenter_api.py @@ -2702,8 +2702,12 @@ class StorageCenterApi(object): payload['StorageCenter'] = self.find_sc() # Have to replicate the active replay. payload['ReplicateActiveReplay'] = replicate_active or synchronous - payload['Type'] = 'Synchronous' if synchronous else 'Asynchronous' - payload['SyncMode'] = 'HighAvailability' + if synchronous: + payload['Type'] = 'Synchronous' + # If our type is synchronous we prefer high availability be set. + payload['SyncMode'] = 'HighAvailability' + else: + payload['Type'] = 'Asynchronous' destinationvolumeattributes = {} destinationvolumeattributes['CreateSourceVolumeFolderPath'] = True destinationvolumeattributes['Notes'] = self.notes