[ARVADOS] updated: 01f05d1fd88b17f88eb671984c8ceab49e6ef3d4

git at public.curoverse.com git at public.curoverse.com
Wed Jul 2 14:12:53 EDT 2014


Summary of changes:
 sdk/cli/bin/crunch-job | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

       via  01f05d1fd88b17f88eb671984c8ceab49e6ef3d4 (commit)
      from  f007a9c4cf2a5c32cddf1a5d1fa652b7acb05380 (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 01f05d1fd88b17f88eb671984c8ceab49e6ef3d4
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 14:12:50 2014 -0400

    Do not mount $TASK_WORK inside the container; scratch space is entirely
    contained so it can be cleaned up by docker when the container is deleted.  Add
    --rm=true to automatically clean up docker containers when they exit.

diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index f758493..9e580d3 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -640,7 +640,6 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
     my $command =
 	"if [ -e $ENV{TASK_WORK} ]; then rm -rf $ENV{TASK_WORK}; fi; "
         ."mkdir -p $ENV{JOB_WORK} $ENV{CRUNCH_TMP} $ENV{TASK_WORK} $ENV{TASK_KEEPMOUNT} $ENV{HOME}"
-        ."&& chmod og+wrx $ENV{TASK_WORK}"
 	."&& cd $ENV{CRUNCH_TMP} ";
     if ($build_script)
     {
@@ -652,14 +651,13 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
     if ($docker_hash)
     {
       $command .= "crunchstat -cgroup-root=/sys/fs/cgroup -cgroup-parent=docker -cgroup-cid=$ENV{TASK_WORK}/docker.cid -poll=10000 ";
-      $command .= "$docker_bin run --attach=stdout --attach=stderr --user=crunch --cidfile=$ENV{TASK_WORK}/docker.cid ";
+      $command .= "$docker_bin run --rm=true --attach=stdout --attach=stderr --user=crunch --cidfile=$ENV{TASK_WORK}/docker.cid ";
       # Dynamically configure the container to use the host system as its
       # DNS server.  Get the host's global addresses from the ip command,
       # and turn them into docker --dns options using gawk.
       $command .=
           q{$(ip -o address show scope global |
               gawk 'match($4, /^([0-9\.:]+)\//, x){print "--dns", x[1]}') };
-      $command .= "--volume=\Q$ENV{TASK_WORK}:/tmp/crunch-job:rw\E ";
       $command .= "--volume=\Q$ENV{CRUNCH_SRC}:/tmp/crunch-src:ro\E ";
       $command .= "--volume=\Q$ENV{TASK_KEEPMOUNT}:/keep:ro\E ";
       $command .= "--env=\QHOME=/home/crunch\E ";

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list