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