From f46ec7b82e0eddcd3952fc6ec93af6cffe19c412 Mon Sep 17 00:00:00 2001 From: Chuan Miao Date: Tue, 23 Jul 2024 12:44:42 +0200 Subject: [PATCH] [netapp] remove last-transfer-size check for updating replica state The last-transfer-size check has not worked very well in production. Replicas with frequent data changes always stay in 'out-of-sync' for its 'replica_state'. This PR removes the check. Closes-Bug: #2066031 Change-Id: I05d2e7c72c04f941182accf8e68102ccea1d6b99 --- .../drivers/netapp/dataontap/cluster_mode/lib_base.py | 9 --------- manila/share/drivers/netapp/options.py | 6 ------ ...-last-transfer-size-limit-check-ec66035ff30ad70b.yaml | 7 +++++++ 3 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 releasenotes/notes/netapp-remove-last-transfer-size-limit-check-ec66035ff30ad70b.yaml 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 01b18eb286..23b286516f 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py @@ -2749,15 +2749,6 @@ class NetAppCmodeFileStorageLibrary(object): .isoformat(), (2 * self._snapmirror_schedule)))): return constants.REPLICA_STATE_OUT_OF_SYNC - replica_backend = share_utils.extract_host(replica['host'], - level='backend_name') - config = data_motion.get_backend_configuration(replica_backend) - config_size = (int(config.safe_get( - 'netapp_snapmirror_last_transfer_size_limit')) * units.Ki) - last_transfer_size = int(snapmirror.get('last-transfer-size', 0)) - if last_transfer_size > config_size: - return constants.REPLICA_STATE_OUT_OF_SYNC - last_transfer_error = snapmirror.get('last-transfer-error', None) if last_transfer_error: LOG.debug('Found last-transfer-error: %(error)s for replica: ' diff --git a/manila/share/drivers/netapp/options.py b/manila/share/drivers/netapp/options.py index deadcb4995..1d4c568d28 100644 --- a/manila/share/drivers/netapp/options.py +++ b/manila/share/drivers/netapp/options.py @@ -250,12 +250,6 @@ netapp_data_motion_opts = [ '"destination" host will be the one that will be ' 'considered when creating a new replica, or promoting ' 'a replica'), - cfg.IntOpt('netapp_snapmirror_last_transfer_size_limit', - min=512, - default=1024, # One MB - help='This option set the last transfer size limit (in KB) ' - 'of snapmirror to decide whether replica is in sync or ' - 'out of sync.'), cfg.IntOpt('netapp_volume_move_cutover_timeout', min=0, default=3600, # One Hour, diff --git a/releasenotes/notes/netapp-remove-last-transfer-size-limit-check-ec66035ff30ad70b.yaml b/releasenotes/notes/netapp-remove-last-transfer-size-limit-check-ec66035ff30ad70b.yaml new file mode 100644 index 0000000000..80405e8e8b --- /dev/null +++ b/releasenotes/notes/netapp-remove-last-transfer-size-limit-check-ec66035ff30ad70b.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + Removed the check for the last transfer size during updating replica state + in the ONTAP driver. Also removed the corresponding option + `netapp_snapmirror_last_transfer_size_limit`. See `launchpad bug 2066031 + `_ for more details.