256ebe
From 37df54966d5b7f01ad24d329bac5da1cf17f2abe Mon Sep 17 00:00:00 2001
256ebe
From: Sunny Kumar <sunkumar@redhat.com>
256ebe
Date: Wed, 12 Jun 2019 16:10:52 +0530
256ebe
Subject: [PATCH 182/192] geo-rep : fix mountbroker setup
256ebe
256ebe
Problem:
256ebe
256ebe
Unable to setup mountbroker root directory while creating geo-replication
256ebe
session for non-root user.
256ebe
256ebe
Casue:
256ebe
With patch[1] which defines the max-port for glusterd one extra sapce
256ebe
got added in field of 'option max-port'.
256ebe
[1]. https://review.gluster.org/#/c/glusterfs/+/21872/
256ebe
256ebe
In geo-rep spliting of key-value pair form vol file was done on the
256ebe
basis of space so this additional space caused "ValueError: too many values
256ebe
to unpack".
256ebe
256ebe
Solution:
256ebe
Use split so that it can treat consecutive whitespace as a single separator.
256ebe
256ebe
Backport of:
256ebe
256ebe
 >Upstream Patch: https://review.gluster.org/#/c/glusterfs/+/22716/
256ebe
 >Fixes: bz#1709248
256ebe
 >Change-Id: Ia22070a43f95d66d84cb35487f23f9ee58b68c73
256ebe
 >Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
256ebe
256ebe
BUG: 1708043
256ebe
Change-Id: Ic6d535a6faad62ce185c6aa5adc18f5fdf8f27be
256ebe
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
256ebe
Reviewed-on: https://code.engineering.redhat.com/gerrit/173149
256ebe
Tested-by: RHGS Build Bot <nigelb@redhat.com>
256ebe
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
256ebe
---
256ebe
 geo-replication/src/peer_mountbroker.py.in | 2 +-
256ebe
 1 file changed, 1 insertion(+), 1 deletion(-)
256ebe
256ebe
diff --git a/geo-replication/src/peer_mountbroker.py.in b/geo-replication/src/peer_mountbroker.py.in
256ebe
index 54f95c4..ce33f97 100644
256ebe
--- a/geo-replication/src/peer_mountbroker.py.in
256ebe
+++ b/geo-replication/src/peer_mountbroker.py.in
256ebe
@@ -47,7 +47,7 @@ class MountbrokerUserMgmt(object):
256ebe
             for line in f:
256ebe
                 line = line.strip()
256ebe
                 if line.startswith("option "):
256ebe
-                    key, value = line.split(" ")[1:]
256ebe
+                    key, value = line.split()[1:]
256ebe
                     self._options[key] = value
256ebe
                 if line.startswith("#"):
256ebe
                     self.commented_lines.append(line)
256ebe
-- 
256ebe
1.8.3.1
256ebe