f338ef
From 924a25990948c9d76001cf4134fc5a2fcbf5c02c Mon Sep 17 00:00:00 2001
f338ef
From: Kotresh HR <khiremat@redhat.com>
f338ef
Date: Fri, 16 Aug 2019 15:38:49 +0530
f338ef
Subject: [PATCH 278/284] geo-rep: Fix worker connection issue
f338ef
f338ef
All the workers connects to primary slave node. It should
f338ef
connect to available slave nodes in round robin fashion
f338ef
and choose different slave node if the corresponding slave
f338ef
node is down. This patch fixes the same.
f338ef
f338ef
Thanks Aravinda for the help in root causing this.
f338ef
f338ef
Backport of:
f338ef
 > Patch: https://review.gluster.org/23247/
f338ef
 > Change-Id: I9f8e7744f4adb8a24833cf173681d109710f98cb
f338ef
 > Signed-off-by: Kotresh HR <khiremat@redhat.com>
f338ef
 > Updates: bz#1737484
f338ef
f338ef
Change-Id: I9f8e7744f4adb8a24833cf173681d109710f98cb
f338ef
Signed-off-by: Kotresh HR <khiremat@redhat.com>
f338ef
BUG: 1729915
f338ef
Reviewed-on: https://code.engineering.redhat.com/gerrit/178961
f338ef
Tested-by: RHGS Build Bot <nigelb@redhat.com>
f338ef
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
f338ef
---
f338ef
 geo-replication/syncdaemon/subcmds.py | 3 ++-
f338ef
 1 file changed, 2 insertions(+), 1 deletion(-)
f338ef
f338ef
diff --git a/geo-replication/syncdaemon/subcmds.py b/geo-replication/syncdaemon/subcmds.py
f338ef
index 4ece7e0..8de7db2 100644
f338ef
--- a/geo-replication/syncdaemon/subcmds.py
f338ef
+++ b/geo-replication/syncdaemon/subcmds.py
f338ef
@@ -73,7 +73,8 @@ def subcmd_worker(args):
f338ef
     Popen.init_errhandler()
f338ef
     fcntl.fcntl(args.feedback_fd, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
f338ef
     local = GLUSTER("localhost", args.master)
f338ef
-    slavehost, slavevol = args.slave.split("::")
f338ef
+    slavevol = args.slave.split("::")[-1]
f338ef
+    slavehost = args.resource_remote
f338ef
     remote = SSH(slavehost, slavevol)
f338ef
     remote.connect_remote()
f338ef
     local.connect()
f338ef
-- 
f338ef
1.8.3.1
f338ef