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