[ARVADOS] created: 1.3.0-2053-gcb2324bc0
Git user
git at public.arvados.org
Tue Jan 7 18:49:37 UTC 2020
at cb2324bc06a663844c7a128d5ffbf09e07dd6815 (commit)
commit cb2324bc06a663844c7a128d5ffbf09e07dd6815
Author: Tom Clegg <tom at tomclegg.ca>
Date: Tue Jan 7 13:48:54 2020 -0500
15937: Suppress errors from fusermount unless mount still exists.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/services/fuse/arvados_fuse/unmount.py b/services/fuse/arvados_fuse/unmount.py
index a72da3a8d..8c8627a1f 100644
--- a/services/fuse/arvados_fuse/unmount.py
+++ b/services/fuse/arvados_fuse/unmount.py
@@ -116,6 +116,7 @@ def unmount(path, subtype=None, timeout=10, recursive=False):
was_mounted = False
attempted = False
+ fusermount_output = ''
if timeout is None:
deadline = None
else:
@@ -155,6 +156,10 @@ def unmount(path, subtype=None, timeout=10, recursive=False):
return was_mounted
if attempted:
+ # Report buffered stderr from previous call to fusermount,
+ # now that we know it didn't succeed.
+ sys.stderr.write(fusermount_output)
+
delay = 1
if deadline:
delay = min(delay, deadline - time.time())
@@ -171,7 +176,10 @@ def unmount(path, subtype=None, timeout=10, recursive=False):
raise
attempted = True
+ fusermount_output = ''
try:
- subprocess.check_call(["fusermount", "-u", "-z", path])
+ fusermount_output = subprocess.check_output(
+ ["fusermount", "-u", "-z", path],
+ stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
pass
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list