From 0d949ac485cc56a86e6a86fff7b636107cd65b9b Mon Sep 17 00:00:00 2001 From: Douglas Viroel Date: Sat, 11 Apr 2020 19:04:56 +0000 Subject: [PATCH] [NetApp] Fix vserver peer creation with same vserver The NetApp cDOT driver is now fixed to ignore vserver peering when creating and promoting shares replicas within the same vserver. Closes-Bug: #1872243 Change-Id: I0b82c15aec7862ee3630330805ac3ac177aae127 --- .../netapp/dataontap/cluster_mode/data_motion.py | 3 ++- .../netapp/dataontap/cluster_mode/lib_multi_svm.py | 3 ++- ...server-peer-with-same-vserver-8bc65816f1764784.yaml | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1872243-netapp-fix-vserver-peer-with-same-vserver-8bc65816f1764784.yaml diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/data_motion.py b/manila/share/drivers/netapp/dataontap/cluster_mode/data_motion.py index 27ac0d6314..9dcb5952c0 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/data_motion.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/data_motion.py @@ -380,7 +380,8 @@ class DataMotionSession(object): # 2. vserver operations when driver handles share servers replica_config = get_backend_configuration(replica_backend) - if replica_config.driver_handles_share_servers: + if (replica_config.driver_handles_share_servers + and replica_vserver != new_src_vserver): # create vserver peering if does not exists if not replica_client.get_vserver_peers(replica_vserver, new_src_vserver): diff --git a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py index f1f93ab66c..e2a64d798b 100644 --- a/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py +++ b/manila/share/drivers/netapp/dataontap/cluster_mode/lib_multi_svm.py @@ -463,7 +463,8 @@ class NetAppCmodeMultiSVMFileStorageLibrary( new_replica_client = data_motion.get_client_for_backend( new_replica_host, vserver_name=dst_vserver) - if not self._get_vserver_peers(dst_vserver, src_vserver): + if (dst_vserver != src_vserver + and not self._get_vserver_peers(dst_vserver, src_vserver)): # 3.1. Request vserver peer creation from new_replica's host # to active replica's host new_replica_client.create_vserver_peer( diff --git a/releasenotes/notes/bug-1872243-netapp-fix-vserver-peer-with-same-vserver-8bc65816f1764784.yaml b/releasenotes/notes/bug-1872243-netapp-fix-vserver-peer-with-same-vserver-8bc65816f1764784.yaml new file mode 100644 index 0000000000..77e35a4750 --- /dev/null +++ b/releasenotes/notes/bug-1872243-netapp-fix-vserver-peer-with-same-vserver-8bc65816f1764784.yaml @@ -0,0 +1,10 @@ +--- +fixes: + - | + NetApp cDOT driver is now fixed to not create peer relationship between + same share servers when handling share replica creation and promotion. + This issue was happening when operating in `driver_handles_share_servers` + enabled mode with backends configured with more than one pool. See + `Launchpad bug 1872243 `_ for more + details. +