VMAX driver - sync sv issue

We have a function which returns a list of all storage
synchronized instances (pairs of volumes in a replication
relationship) associated with a particular volume. This is
done to get any snapshots associated with a volume before
deletion, but it fails to differentiate between local
replication and remote replication volume pairs. This can
cause issues when deleting a replicated volume. This patch
adds a check to ensure the target volume's storage system
is the same as the source volume's storage system.

Change-Id: I9ae765c5da35fe2fb0b4001439070f1c6d32e095
Closes-Bug: #1660368
This commit is contained in:
Helen Walsh
2017-01-30 15:42:24 +00:00
parent ac6022811f
commit 7c8cab08a8
2 changed files with 18 additions and 2 deletions

View File

@@ -1272,6 +1272,8 @@ class VMAXUtils(object):
for syncInstanceName in syncInstanceNames:
syncSvTarget = syncInstanceName['SyncedElement']
syncSvSource = syncInstanceName['SystemElement']
if storageSystem != syncSvTarget['SystemName']:
continue
if syncSvTarget['DeviceID'] == volumeInstance['DeviceID'] or (
syncSvSource['DeviceID'] == volumeInstance['DeviceID']):
# Check that it hasn't recently been deleted.
@@ -2941,8 +2943,8 @@ class VMAXUtils(object):
"""
foundSyncInstanceName = None
syncInstanceNames = conn.EnumerateInstanceNames(
'SE_StorageSynchronized_SV_SV')
syncInstanceNames = conn.ReferenceNames(
sourceInstance.path, ResultClass='SE_StorageSynchronized_SV_SV')
for syncInstanceName in syncInstanceNames:
syncSvTarget = syncInstanceName['SyncedElement']
syncSvSource = syncInstanceName['SystemElement']