From b1dc7723610325789ba91220ab414e821ec14119 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Fri, 16 Aug 2019 15:38:49 +0530 Subject: 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 Updates: bz#1737484 --- geo-replication/syncdaemon/subcmds.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- cgit