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