[ARVADOS] created: db9ba8d9039a210745939b0d008c75d7645ff3ba
git at public.curoverse.com
git at public.curoverse.com
Thu Jul 23 14:32:15 EDT 2015
at db9ba8d9039a210745939b0d008c75d7645ff3ba (commit)
commit db9ba8d9039a210745939b0d008c75d7645ff3ba
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Jul 23 14:29:02 2015 -0400
6643-fuse-del-crash: "Magic directory" creates an inode for collection
directory, but did not properly clean up on failure, resulting in object uuid
collision when re-attempting collection directory lookup. Now deletes stale
inode on failed collection lookups.
diff --git a/services/fuse/arvados_fuse/fusedir.py b/services/fuse/arvados_fuse/fusedir.py
index 16b3bb2..c835665 100644
--- a/services/fuse/arvados_fuse/fusedir.py
+++ b/services/fuse/arvados_fuse/fusedir.py
@@ -423,8 +423,8 @@ class CollectionDirectory(CollectionDirectoryBase):
return True
finally:
self._updating_lock.release()
- except arvados.errors.NotFoundError:
- _logger.exception("arv-mount %s: error", self.collection_locator)
+ except arvados.errors.NotFoundError as e:
+ _logger.error("Error fetching collection '%s': %s", self.collection_locator, e)
except arvados.errors.ArgumentError as detail:
_logger.warning("arv-mount %s: error %s", self.collection_locator, detail)
if self.collection_record is not None and "manifest_text" in self.collection_record:
@@ -516,21 +516,15 @@ will appear if it exists.
if k in self._entries:
return True
- if not portable_data_hash_pattern.match(k) and not uuid_pattern.match(k):
- return False
-
- try:
- e = self.inodes.add_entry(CollectionDirectory(
- self.inode, self.inodes, self.api, self.num_retries, k))
-
- if e.update():
- self._entries[k] = e
+ if portable_data_hash_pattern.match(k) or uuid_pattern.match(k):
+ cd = self.inodes.add_entry(CollectionDirectory(self.inode, self.inodes, self.api, self.num_retries, k))
+ if cd.update():
+ self._entries[k] = cd
return True
else:
- return False
- except Exception as e:
- _logger.debug('arv-mount exception keep %s', e)
- return False
+ self.inodes.del_entry(cd)
+
+ return False
def __getitem__(self, item):
if item in self:
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list