summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2019-08-16 15:38:49 +0530
committerAmar Tumballi <amarts@gmail.com>2019-08-20 06:20:33 +0000
commitb1dc7723610325789ba91220ab414e821ec14119 (patch)
tree0e37c4db45e4f7f84fd7329e7228bc7c549d07a2 /geo-replication
parentf138d3fa2237e7fa940ecf17153fd700350c4138 (diff)
geo-rep: Fix worker connection issue
All the workers connects to primary slave node. It should connect to available slave nodes in round robin fashion and choose different slave node if the corresponding slave node is down. This patch fixes the same. Thanks Aravinda for the help in root causing this. Change-Id: I9f8e7744f4adb8a24833cf173681d109710f98cb Signed-off-by: Kotresh HR <khiremat@redhat.com> Updates: bz#1737484
Diffstat (limited to 'geo-replication')
-rw-r--r--geo-replication/syncdaemon/subcmds.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/subcmds.py b/geo-replication/syncdaemon/subcmds.py
index 4ece7e06b89..8de7db2cdaa 100644
--- a/geo-replication/syncdaemon/subcmds.py
+++ b/geo-replication/syncdaemon/subcmds.py
@@ -73,7 +73,8 @@ def subcmd_worker(args):
Popen.init_errhandler()
fcntl.fcntl(args.feedback_fd, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
local = GLUSTER("localhost", args.master)
- slavehost, slavevol = args.slave.split("::")
+ slavevol = args.slave.split("::")[-1]
+ slavehost = args.resource_remote
remote = SSH(slavehost, slavevol)
remote.connect_remote()
local.connect()