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. +