Project

General

Profile

Feature #7939

Updated by Brett Smith over 8 years ago

Today, arv-mount daemonizes very early, before it initializes FUSE or makes any API calls. FUSE.    If those later steps fail, FUSE initialization fails (e.g., user not in fuse group, @--allow-other@ used by nonroot when FUSE is not configured with @user_allow_other@), arv-mount will not give the user any indication of that.    They'll just see that nothing is actually mounted.    Examples of things that can go wrong: 

 * The user doesn't have permission to use If FUSE 
 * The user specified @--allow-other@ but @user_allow_other@ is not set in @/etc/fuse.conf@ 
 * The user has a bad Arvados client configuration (wrong API server; invalid API token) 
 * The user tried to mount a collection that they can't read 

 When nothing can be mounted as a consequence of user or administrator error, that initialization fails, the error should be reported on stderr, and arv-mount should exit nonzero, so the user immediately knows that there's been a problem, and ideally gets details about what that problem is.    For the scope of this story, errors from uncaught exceptions are fine.    Obviously we want better error reporting, but that can happen in a later story. 

 We've tried to fix this in the past, but it's non-trivial because our daemonization code closes all file descriptors by default, and FUSE initialization opens @/dev/fuse@, with no apparent API to find the file descriptor it's using.    See commit:f573c35a8f. 

 If you do find a way to find that file descriptor, you can pass it in the @preserve_files@ argument list to @daemon.DaemonContext@, and then daemonize just before @llfuse.main()@. only after initialization has finished.    If you do this, you'll also need to pass in the file descriptor for the user's log file, if any.

Back