summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/monitor.py
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-02-12 03:11:04 -0500
committerKotresh HR <khiremat@redhat.com>2018-02-22 05:40:35 +0000
commite4ca0b3df379c553e220f929f0203175bd536b61 (patch)
treeb4e673999ea45bf1a5370015e19d5241bf4aa965 /geo-replication/syncdaemon/monitor.py
parent961370d995400b68afe520207593b8cc59846448 (diff)
geo-rep: Remove lazy umount and use mount namespaces
Lazy umounting the master volume by worker causes issues with rsync's usage of getcwd. Henc removing the lazy umount and using private mount namespace for the same. On the slave, the lazy umount is retained as we can't use private namespace in non root geo-rep setup. Change-Id: I403375c02cb3cc7d257a5f72bbdb5118b4c8779a BUG: 1546129 Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/monitor.py')
-rw-r--r--geo-replication/syncdaemon/monitor.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/monitor.py b/geo-replication/syncdaemon/monitor.py
index 257d34a743b..0d1423aca9f 100644
--- a/geo-replication/syncdaemon/monitor.py
+++ b/geo-replication/syncdaemon/monitor.py
@@ -221,7 +221,13 @@ class Monitor(object):
if rconf.args.debug:
args_to_worker.append("--debug")
- os.execv(sys.executable, args_to_worker)
+ access_mount = gconf.get("access-mount")
+ if access_mount:
+ os.execv(sys.executable, args_to_worker)
+ else:
+ unshare_cmd = ['unshare', '-m', '--propagation', 'private']
+ cmd = unshare_cmd + args_to_worker
+ os.execvp("unshare", cmd)
cpids.add(cpid)
agents.add(apid)