|
|
f338ef |
From f65f4739914cf317da7e5eaa3b5a06fe64f338c2 Mon Sep 17 00:00:00 2001
|
|
|
f338ef |
From: Sunny Kumar <sunkumar@redhat.com>
|
|
|
f338ef |
Date: Sat, 21 Sep 2019 01:07:30 +0530
|
|
|
f338ef |
Subject: [PATCH 298/302] geo-rep : fix sub-command during worker connection
|
|
|
f338ef |
|
|
|
f338ef |
Problem:
|
|
|
f338ef |
|
|
|
f338ef |
Geo-rep session for non-root going faulty.
|
|
|
f338ef |
|
|
|
f338ef |
Solution:
|
|
|
f338ef |
|
|
|
f338ef |
During worker start we do not construct slave url and use 'args.resource_remote'
|
|
|
f338ef |
which is basically just slave-hostname.
|
|
|
f338ef |
This works better for root session but fails in non-root session during
|
|
|
f338ef |
ssh command.
|
|
|
f338ef |
Using slave url solves this issue.
|
|
|
f338ef |
|
|
|
f338ef |
Backport of:
|
|
|
f338ef |
>fixes: bz#1753928
|
|
|
f338ef |
>Change-Id: Ib83552fde77f81c208896494b323514ab37ebf22
|
|
|
f338ef |
>Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
f338ef |
|
|
|
f338ef |
Upstream patch:
|
|
|
f338ef |
https://review.gluster.org/#/c/glusterfs/+/23465/
|
|
|
f338ef |
|
|
|
f338ef |
BUG: 1754407
|
|
|
f338ef |
Change-Id: Ib83552fde77f81c208896494b323514ab37ebf22
|
|
|
f338ef |
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
|
|
|
f338ef |
Reviewed-on: https://code.engineering.redhat.com/gerrit/181895
|
|
|
f338ef |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
f338ef |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
f338ef |
---
|
|
|
f338ef |
geo-replication/syncdaemon/subcmds.py | 7 +++++--
|
|
|
f338ef |
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
f338ef |
|
|
|
f338ef |
diff --git a/geo-replication/syncdaemon/subcmds.py b/geo-replication/syncdaemon/subcmds.py
|
|
|
f338ef |
index 8de7db2..f8515f2 100644
|
|
|
f338ef |
--- a/geo-replication/syncdaemon/subcmds.py
|
|
|
f338ef |
+++ b/geo-replication/syncdaemon/subcmds.py
|
|
|
f338ef |
@@ -73,8 +73,11 @@ def subcmd_worker(args):
|
|
|
f338ef |
Popen.init_errhandler()
|
|
|
f338ef |
fcntl.fcntl(args.feedback_fd, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
|
|
|
f338ef |
local = GLUSTER("localhost", args.master)
|
|
|
f338ef |
- slavevol = args.slave.split("::")[-1]
|
|
|
f338ef |
- slavehost = args.resource_remote
|
|
|
f338ef |
+ slave_url, slavevol = args.slave.split("::")
|
|
|
f338ef |
+ if "@" not in slave_url:
|
|
|
f338ef |
+ slavehost = args.resource_remote
|
|
|
f338ef |
+ else:
|
|
|
f338ef |
+ slavehost = "%s@%s" % (slave_url.split("@")[0], args.resource_remote)
|
|
|
f338ef |
remote = SSH(slavehost, slavevol)
|
|
|
f338ef |
remote.connect_remote()
|
|
|
f338ef |
local.connect()
|
|
|
f338ef |
--
|
|
|
f338ef |
1.8.3.1
|
|
|
f338ef |
|