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