[NetApp] Fix vserver peer accept on intra cluster replication

The NetApp driver is now fixed to not trigger vserver peer accept when
handling with share replica operations on 'driver_handle_share_servers'
mode enabled.

Closes-Bug: #1873963
Change-Id: I9df8b48bf2c127f266c1b950bafc710bc28f7632
This commit is contained in:
Douglas Viroel 2020-04-20 22:20:12 +00:00
parent 301789f9be
commit 00e548a60c
3 changed files with 19 additions and 4 deletions

View File

@ -389,12 +389,14 @@ class DataMotionSession(object):
new_src_backend, vserver_name=new_src_vserver)
# Cluster name is needed for setting up the vserver peering
new_src_cluster_name = new_src_client.get_cluster_name()
replica_cluster_name = replica_client.get_cluster_name()
replica_client.create_vserver_peer(
replica_vserver, new_src_vserver,
peer_cluster_name=new_src_cluster_name)
new_src_client.accept_vserver_peer(new_src_vserver,
replica_vserver)
if new_src_cluster_name != replica_cluster_name:
new_src_client.accept_vserver_peer(new_src_vserver,
replica_vserver)
# 3. create
# TODO(ameade): Update the schedule if needed.

View File

@ -462,6 +462,7 @@ class NetAppCmodeMultiSVMFileStorageLibrary(
new_replica['host'], level='backend_name')
new_replica_client = data_motion.get_client_for_backend(
new_replica_host, vserver_name=dst_vserver)
new_replica_cluster_name = new_replica_client.get_cluster_name()
if (dst_vserver != src_vserver
and not self._get_vserver_peers(dst_vserver, src_vserver)):
@ -472,8 +473,10 @@ class NetAppCmodeMultiSVMFileStorageLibrary(
peer_cluster_name=src_replica_cluster_name)
# 3.2. Accepts the vserver peering using active replica host's
# client
src_replica_client.accept_vserver_peer(src_vserver, dst_vserver)
# client (inter-cluster only)
if new_replica_cluster_name != src_replica_cluster_name:
src_replica_client.accept_vserver_peer(src_vserver,
dst_vserver)
return (super(NetAppCmodeMultiSVMFileStorageLibrary, self).
create_replica(context, replica_list, new_replica,

View File

@ -0,0 +1,10 @@
---
fixes:
- |
NetApp cDOT driver is now fixed to not trigger peer accept operation
between share servers that belong to the same cluster, when handling share
replica creation and promotion. This issue was happening when operating in
`driver_handles_share_servers` enabled mode with multiple backends
configured within the same cluster. See
`Launchpad bug 1873963 <https://launchpad.net/bugs/1873963>`_ for more
details.