summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/argsupgrade.py
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2019-03-14 20:06:54 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2019-04-17 13:58:46 +0000
commitcbb52082da9d968908dc2f62b59328e948ced271 (patch)
tree230a443d21601134ed0d43ffbc76c071c0d59ece /geo-replication/syncdaemon/argsupgrade.py
parentf39fc92d6521a5b87a635dd35989c0af90e7b789 (diff)
geo-rep: IPv6 support
`address_family=inet6` needs to be added while mounting master and slave volumes in gverify script. New option introduced to gluster cli(`--inet6`) which will be used internally by geo-rep while calling `gluster volume info --remote-host=<ipv6>`. Backport of https://review.gluster.org/22363 Fixes: bz#1695436 Change-Id: I1e0d42cae07158df043e64a2f991882d8c897837 Signed-off-by: Aravinda VK <avishwan@redhat.com> (cherry picked from commit 240e1d6821fbb779c3dd73f6f0225d755a5b7cc6)
Diffstat (limited to 'geo-replication/syncdaemon/argsupgrade.py')
-rw-r--r--geo-replication/syncdaemon/argsupgrade.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/argsupgrade.py b/geo-replication/syncdaemon/argsupgrade.py
index 4018143b8b4..7af40633ef8 100644
--- a/geo-replication/syncdaemon/argsupgrade.py
+++ b/geo-replication/syncdaemon/argsupgrade.py
@@ -84,6 +84,10 @@ def upgrade():
# fail when it does stat to check the existence.
init_gsyncd_template_conf()
+ inet6 = False
+ if "--inet6" in sys.argv:
+ inet6 = True
+
if "--monitor" in sys.argv:
# python gsyncd.py --path=/bricks/b1
# --monitor -c gsyncd.conf
@@ -147,8 +151,11 @@ def upgrade():
user, hname = remote_addr.split("@")
+ if not inet6:
+ hname = gethostbyname(hname)
+
print(("ssh://%s@%s:gluster://127.0.0.1:%s" % (
- user, gethostbyname(hname), vol)))
+ user, hname, vol)))
sys.exit(0)
elif "--normalize-url" in sys.argv:
@@ -346,3 +353,7 @@ def upgrade():
if pargs.reset_sync_time:
sys.argv.append("--reset-sync-time")
+
+ if inet6:
+ # Add `--inet6` as first argument
+ sys.argv = [sys.argv[0], "--inet6"] + sys.argv[1:]