Brett Smith [Fri, 27 Jun 2014 18:30:38 +0000 (14:30 -0400)]
2891: Workbench renders login exceptions earlier.
These changes are designed to ensure that if there are any problems
getting information from the current API token (other than expected
401 Unauthorized responses), those problems are raised early and
propagated up to the exception handler. This helps better ensure that
thread state is consistent when we get to later stages of request
processing.
Brett Smith [Wed, 25 Jun 2014 20:39:24 +0000 (16:39 -0400)]
2891: Guard against API server errors in Workbench layout.
The goal here is to generally avoid situations like #3031 where
trouble talking to the API server prevents us from even rendering an
error page. Previous commits made us smarter about logged in status.
This guards against other API errors.
Brett Smith [Mon, 23 Jun 2014 19:28:48 +0000 (15:28 -0400)]
2891: Workbench API client raises structured exceptions.
These changes will make it easier for the rest of the Workbench code
to cope with these errors more gracefully—even if that just means
friendlier reporting of the error.
Brett Smith [Tue, 24 Jun 2014 15:38:50 +0000 (11:38 -0400)]
2891: API server assigns error tokens.
These unique tokens are both logged and sent along with the response,
making it easier to cross-reference what the client does with what
happens on the API server.
radhika [Mon, 30 Jun 2014 15:39:41 +0000 (11:39 -0400)]
2659: look for scopes and expires_at when getting anonymous token. also, update create anonymous user to check for group link even when the user exists.
Brett Smith [Tue, 24 Jun 2014 19:02:39 +0000 (15:02 -0400)]
Fix bad interaction between llfuse and daemonization in arv-mount.
Following PEP 3143, daemon.DaemonContext drops all open file
descriptors by default. This causes arv-mount to fail, because
llfuse.init() opens /dev/fuse, and llfuse.main() uses that file
descriptor. We now daemonize before doing real work to prevent this
unintentional breakage.
This effectively reverts 83c873af. An alternative approach would've
been to call DaemonContext with a preserve_files argument. I decided
against that because I couldn't find a reliable way to determine
which file descriptors llfuse needs. If we really need the daemon to
report errors, and debugging with --foreground isn't sufficient, I
think we should implement proper logging to a file or syslog.
Peter Amstutz [Tue, 24 Jun 2014 17:50:23 +0000 (13:50 -0400)]
Make task working directory world writable, to deal with uid mapping problems
where the uid of the crunch-job user doesn't match uid the docker image user.
CRUNCH_SRC, TASK_WORK, TASK_KEEPMOUNT and are now always bound to
/tmp/crunch-src, /tmp/crunch-job, /mnt respectively when running inside a
docker image.
Peter Amstutz [Tue, 24 Jun 2014 15:29:56 +0000 (11:29 -0400)]
MagicDirectory.__contains__ now creates CollectionDirectory (which creates
CollectionReader()) and uses update() to determine if a collection exists;
handles cases where the collection only exists on API server. Also improved
arv-mount debug logging. no issue #
Peter Amstutz [Tue, 24 Jun 2014 13:16:25 +0000 (09:16 -0400)]
Add support for ARVADOS_API_HOST_INSECURE environment variable. Use Net::SSL
instead of IO::Socket::SSL because the latter seems to ignore
PERL_LWP_SSL_VERIFY_HOSTNAME. no issue #
Peter Amstutz [Tue, 24 Jun 2014 13:05:59 +0000 (09:05 -0400)]
Adds "--strip" option to arv-normalize to strip off authorization tokens.
Fixed "mismatched collection uuid" in the "create collection from parts of
other collections" feature of workbench. no issue #
Brett Smith [Mon, 23 Jun 2014 14:43:02 +0000 (10:43 -0400)]
2891: Refactor Workbench API token filters.
Remove dead code and simplify the implementation, especially the
relationship between the "required" and "optional" filters, per
discussion with Peter.
Brett Smith [Fri, 20 Jun 2014 18:31:33 +0000 (14:31 -0400)]
2891: Workbench handles expired tokens more consistently.
Previously Workbench would behave differently depending on whether an
expired token was provided as a query parameter, or living in a
session. This makes it do the same thing in all cases. It also fixes
some small bugs around removing api_token from URL paths.
Peter Amstutz [Fri, 20 Jun 2014 21:10:10 +0000 (17:10 -0400)]
2986: Handles collection ids in 'arv edit' (tells the user collections are not
editable.) Added error message when subcommand or resource is
unrecognized. Removed old reference to removed command line parameter
global_opts[:resources].
Brett Smith [Fri, 20 Jun 2014 14:40:02 +0000 (10:40 -0400)]
3031: Improve "Docker image not found" error message.
Rails automatically adds the column name to rendered error message, so
the old version was coming out as "Docker image locator Docker image
not found." This version reads better. Refs #3031.
Peter Amstutz [Thu, 19 Jun 2014 19:35:01 +0000 (15:35 -0400)]
2986: Implemented "arv edit" command. Refactored 'arv' to be easier to follow.
Changed control flow of command line processing so that trollop gets a chance
to see command line before subcommands. Improved help text for subcommands.