diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py index bfe2d78d8a..acc8e7f051 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py @@ -1571,9 +1571,12 @@ class NetAppCmodeFileStorageLibrary(object): return constants.REPLICA_STATE_OUT_OF_SYNC snapmirror = snapmirrors[0] - + # NOTE(dviroel): Don't try to resume or resync a SnapMirror that has + # one of the in progress transfer states, because the storage will + # answer with an error. + in_progress_status = ['preparing', 'transferring', 'finalizing'] if (snapmirror.get('mirror-state') != 'snapmirrored' and - snapmirror.get('relationship-status') == 'transferring'): + snapmirror.get('relationship-status') in in_progress_status): return constants.REPLICA_STATE_OUT_OF_SYNC if snapmirror.get('mirror-state') != 'snapmirrored': diff --git a/releasenotes/notes/bug-1848889-netapp-fix-share-replica-update-check-failure-90aa964417e7734c.yaml b/releasenotes/notes/bug-1848889-netapp-fix-share-replica-update-check-failure-90aa964417e7734c.yaml new file mode 100644 index 0000000000..e06bc09ea0 --- /dev/null +++ b/releasenotes/notes/bug-1848889-netapp-fix-share-replica-update-check-failure-90aa964417e7734c.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + Fixed an issue in NetApp driver share replica periodic check that + erroneously set a replica state to 'error'. In this routine, a SnapMirror + resync operation was being triggered while the replica data transfering is + still in progress, receiving an error from the storage side. The driver now + skips resync operation for all in progress SnapMirror relationship status. +