[ARVADOS] updated: b366f855557333cd99fce42ab56af1c66388b18e

git at public.curoverse.com git at public.curoverse.com
Wed Sep 3 15:55:09 EDT 2014


Summary of changes:
 services/fuse/arvados_fuse/__init__.py |  5 +++--
 services/fuse/bin/arv-mount            | 12 +++++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)

       via  b366f855557333cd99fce42ab56af1c66388b18e (commit)
      from  252d0e3c02b355577e4d20331c787cbb7b02a7d8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b366f855557333cd99fce42ab56af1c66388b18e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Sep 3 15:55:06 2014 -0400

    3644: Tested, fixed various mount modes.

diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index fd5463a..6d55b34 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -257,8 +257,8 @@ class CollectionDirectory(Directory):
 
     def update(self):
         try:
-            if re.match(r'^[a-f0-9]{32}', self.collection_locator):
-                return
+            if self.collection_object is not None and re.match(r'^[a-f0-9]{32}', self.collection_locator):
+                return True
             #with llfuse.lock_released:
             new_collection_object = self.api.collections().get(uuid=self.collection_locator).execute()
             if "portable_data_hash" not in new_collection_object:
@@ -289,6 +289,7 @@ class CollectionDirectory(Directory):
                     for k, v in s.files().items():
                         cwd._entries[sanitize_filename(k)] = self.inodes.add_entry(StreamReaderFile(cwd.inode, v, self.ctime(), self.mtime()))
             self.fresh()
+            return True
         except Exception as detail:
             _logger.error("arv-mount %s: error", self.collection_locator)
             _logger.exception(detail)
diff --git a/services/fuse/bin/arv-mount b/services/fuse/bin/arv-mount
index db70036..89acdd6 100755
--- a/services/fuse/bin/arv-mount
+++ b/services/fuse/bin/arv-mount
@@ -88,21 +88,23 @@ with "--".
         operations = Operations(os.getuid(), os.getgid())
         api = arvados.api('v1')
 
+        usr = api.users().current().execute()
         if args.by_hash:
             # Set up the request handler with the 'magic directory' at the root
             operations.inodes.add_entry(MagicDirectory(llfuse.ROOT_INODE, operations.inodes, api))
         elif args.by_tag:
             operations.inodes.add_entry(TagsDirectory(llfuse.ROOT_INODE, operations.inodes, api))
         elif args.shared:
-            operations.inodes.add_entry(SharedDirectory(llfuse.ROOT_INODE, operations.inodes, api))
+            operations.inodes.add_entry(SharedDirectory(llfuse.ROOT_INODE, operations.inodes, api, usr))
+        elif args.home:
+            operations.inodes.add_entry(ProjectDirectory(llfuse.ROOT_INODE, operations.inodes, api, usr))
         elif args.collection != None:
             # Set up the request handler with the collection at the root
-            operations.inodes.add_entry(CollectionDirectory(llfuse.ROOT_INODE, operations.inodes, args.collection))
-        elif args.project != None:
-            operations.inodes.add_entry(ProjectDirectory(llfuse.ROOT_INODE, operations.inodes, args.project))
+            operations.inodes.add_entry(CollectionDirectory(llfuse.ROOT_INODE, operations.inodes, api, args.collection))
+        elif args.project != None:            
+            operations.inodes.add_entry(ProjectDirectory(llfuse.ROOT_INODE, operations.inodes, api, api.groups().get(uuid=args.project).execute()))
         else:
             e = operations.inodes.add_entry(Directory(llfuse.ROOT_INODE))
-            usr = api.users().current().execute()
             e._entries['home'] = operations.inodes.add_entry(ProjectDirectory(e.inode, operations.inodes, api, usr))
             e._entries['shared'] = operations.inodes.add_entry(SharedDirectory(e.inode, operations.inodes, api, usr))
             e._entries['by_tag'] = operations.inodes.add_entry(TagsDirectory(e.inode, operations.inodes, api))

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list