[ARVADOS] created: 7b4d7faff279490a40190208bd571a86090e2bf5

git at public.curoverse.com git at public.curoverse.com
Thu May 15 16:49:23 EDT 2014


        at  7b4d7faff279490a40190208bd571a86090e2bf5 (commit)


commit 7b4d7faff279490a40190208bd571a86090e2bf5
Author: Ward Vandewege <ward at curoverse.com>
Date:   Thu May 15 16:47:42 2014 -0400

    CollectionReader can throw exceptions (for example, when passing an
    argument that is not a manifest or collection UUID). Trap those and
    print an error message, instead blowing up the fuse driver.

diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index 8b734f2..7396c29 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -182,18 +182,21 @@ class CollectionDirectory(Directory):
         return i['uuid'] == self.collection_locator
 
     def update(self):
-        collection = arvados.CollectionReader(arvados.Keep.get(self.collection_locator))
-        for s in collection.all_streams():
-            cwd = self
-            for part in s.name().split('/'):
-                if part != '' and part != '.':
-                    if part not in cwd._entries:
-                        cwd._entries[part] = self.inodes.add_entry(Directory(cwd.inode))
-                    cwd = cwd._entries[part]
-            for k, v in s.files().items():
-                cwd._entries[k] = self.inodes.add_entry(StreamReaderFile(cwd.inode, v))
-        self.fresh()
-
+        try:
+            collection = arvados.CollectionReader(arvados.Keep.get(self.collection_locator))
+            for s in collection.all_streams():
+                cwd = self
+                for part in s.name().split('/'):
+                    if part != '' and part != '.':
+                        if part not in cwd._entries:
+                            cwd._entries[part] = self.inodes.add_entry(Directory(cwd.inode))
+                        cwd = cwd._entries[part]
+                for k, v in s.files().items():
+                    cwd._entries[k] = self.inodes.add_entry(StreamReaderFile(cwd.inode, v))
+            print "found"
+            self.fresh()
+        except Exception as detail:
+            print("%s: error: %s" % (self.collection_locator,detail) )
 
 class MagicDirectory(Directory):
     '''A special directory that logically contains the set of all extant keep

commit 83c873af757aea4217648cc5a909fcadcf3e93e4
Author: Ward Vandewege <ward at curoverse.com>
Date:   Thu May 15 16:18:38 2014 -0400

    In daemon mode, arv-mount should set up the fuse connection before
    forking to the background, so that any failures to set up are reported
    to the user.

diff --git a/services/fuse/bin/arv-mount b/services/fuse/bin/arv-mount
index f6b2992..904fbf1 100755
--- a/services/fuse/bin/arv-mount
+++ b/services/fuse/bin/arv-mount
@@ -82,7 +82,7 @@ collections on the server.""")
             llfuse.init(operations, args.mountpoint, opts)
             llfuse.main()
         else:
+            # Initialize the fuse connection
+            llfuse.init(operations, args.mountpoint, opts)
             with daemon.DaemonContext():
-                # Initialize the fuse connection
-                llfuse.init(operations, args.mountpoint, opts)
                 llfuse.main()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list