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.
Brett Smith [Thu, 19 Jun 2014 19:14:07 +0000 (15:14 -0400)]
2937: Make sure Collection share links end with /.
This is necessary to prevent wget from saving a plain HTML file with
the name of the reader token. With a file there, it's not possible to
make a directory tree for recursive downloads.
Tim Pierce [Tue, 17 Jun 2014 19:03:07 +0000 (15:03 -0400)]
2936: fix job progress bars
Add edge case settings for when a crunch job could not be started, or
when no tasks were ever created.
Calculate percent_total_tasks as a float, to ensure that it will be
nonzero even if there are more than 100 tasks altogether. Calculate
percentages of individual task progress with .ceil to ensure that there
will be at least 1% shown for each nonzero task status.