summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/syncdutils.py
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-04-07 06:19:30 -0400
committerAravinda VK <avishwan@redhat.com>2017-04-27 05:58:51 +0000
commit9f5e59abfbf529b91d699143b0c69c8748ac6253 (patch)
tree9cdc08f00abf4cbfec365530bccc813d6544ab78 /geo-replication/syncdaemon/syncdutils.py
parent3579aaaef0027c62bad57952e433e15fa9f1532c (diff)
downloadglusterfs-9f5e59abfbf529b91d699143b0c69c8748ac6253.tar.gz
glusterfs-9f5e59abfbf529b91d699143b0c69c8748ac6253.tar.xz
glusterfs-9f5e59abfbf529b91d699143b0c69c8748ac6253.zip
geo-rep: Fix mount cleanup
On corner cases, mount cleanup might cause worker crash. Fixing the same. Change-Id: I38c0af51d10673765cdb37bc5b17bb37efd043b8 BUG: 1433506 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/17015 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/syncdutils.py')
-rw-r--r--geo-replication/syncdaemon/syncdutils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
index 7385eb154b..c6acfbb050 100644
--- a/geo-replication/syncdaemon/syncdutils.py
+++ b/geo-replication/syncdaemon/syncdutils.py
@@ -241,7 +241,12 @@ def finalize(*a, **kw):
p0 = subprocess.Popen (["umount", "-l", mnt], stderr=subprocess.PIPE)
_, errdata = p0.communicate()
if p0.returncode == 0:
- os.rmdir(mnt)
+ try:
+ os.rmdir(mnt)
+ except OSError:
+ pass
+ else:
+ pass
if gconf.log_exit:
logging.info("exiting.")