[ARVADOS] created: 1.3.0-2053-g6a4098aa1

Git user git at public.arvados.org
Tue Jan 7 19:30:24 UTC 2020


        at  6a4098aa1207c276e2e6bf9a6128b30084ad4b1e (commit)


commit 6a4098aa1207c276e2e6bf9a6128b30084ad4b1e
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Tue Jan 7 14:30:16 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..1f06d8c91 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 = b''
     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())
@@ -172,6 +177,10 @@ def unmount(path, subtype=None, timeout=10, recursive=False):
 
         attempted = True
         try:
-            subprocess.check_call(["fusermount", "-u", "-z", path])
-        except subprocess.CalledProcessError:
-            pass
+            subprocess.check_output(
+                ["fusermount", "-u", "-z", path],
+                stderr=subprocess.STDOUT)
+        except subprocess.CalledProcessError as e:
+            fusermount_output = e.output
+        else:
+            fusermount_output = b''

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list