summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/master.py
diff options
context:
space:
mode:
authorAravinda Vishwanathapura <aravinda@kadalu.io>2020-07-12 12:42:36 +0530
committerAravinda Vishwanathapura <aravinda@kadalu.io>2020-07-12 15:09:26 +0530
commit93598b2dd323e4ed20e3297bbab2a151c40a0595 (patch)
tree259e70e8bff461ee12af4adc74091d801937c960 /geo-replication/syncdaemon/master.py
parentf3df1a5d6e44f70c51a3cdbb4873c1c5a2fd0771 (diff)
geo-replication: Fix IPv6 parsing
Brick paths in Volinfo used `:` as delimiter, Geo-rep uses split based on `:` char. This will go wrong with IPv6. This patch handles the IPv6 case and handles the split properly. Fixes: #1366 Change-Id: I25e88d693744381c0ccf3c1dbf1541b84be2499d Signed-off-by: Aravinda Vishwanathapura <aravinda@kadalu.io>
Diffstat (limited to 'geo-replication/syncdaemon/master.py')
-rw-r--r--geo-replication/syncdaemon/master.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index 03d871415e6..9501aeae6b5 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -27,7 +27,8 @@ from rconf import rconf
from syncdutils import (Thread, GsyncdError, escape_space_newline,
unescape_space_newline, gauxpfx, escape,
lstat, errno_wrap, FreeObject, lf, matching_disk_gfid,
- NoStimeAvailable, PartialHistoryAvailable)
+ NoStimeAvailable, PartialHistoryAvailable,
+ host_brick_split)
URXTIME = (-1, 0)
@@ -1466,7 +1467,7 @@ class GMasterChangelogMixin(GMasterCommon):
node = rconf.args.resource_remote
node_data = node.split("@")
node = node_data[-1]
- remote_node_ip = node.split(":")[0]
+ remote_node_ip, _ = host_brick_split(node)
self.status.set_slave_node(remote_node_ip)
def changelogs_batch_process(self, changes):