[ARVADOS] updated: 0eb5711ade0f74e556b0a1c10909dbf0bdecb63f

git at public.curoverse.com git at public.curoverse.com
Thu Sep 4 11:34:57 EDT 2014


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

       via  0eb5711ade0f74e556b0a1c10909dbf0bdecb63f (commit)
      from  0fdafcb846ec6bb34e4b8ae91ad62c1ccd328355 (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 0eb5711ade0f74e556b0a1c10909dbf0bdecb63f
Author: Ward Vandewege <ward at curoverse.com>
Date:   Thu Sep 4 11:33:36 2014 -0400

    Revert 2 hunks from a5819ec1e48fba90658fcf676ffc50c1f216d484, thus
    un-breaking crunch-job in two important ways:
    
    * task stdout and stderr are propagated again
    
    * tasks can actually run because crunch-src is available in the docker
      container again
    
    no issue #

diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 0d31afc..d1cbde6 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -656,6 +656,8 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
     if ($build_script)
     {
       $build_script_to_send = $build_script;
+      $command .=
+	  "&& perl -";
     }
     $command .= "&& exec arv-mount --allow-other $ENV{TASK_KEEPMOUNT} --exec ";
     if ($docker_hash)
@@ -668,12 +670,16 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
       $command .=
           q{$(ip -o address show scope global |
               gawk 'match($4, /^([0-9\.:]+)\//, x){print "--dns", x[1]}') };
+      $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 ";
       while (my ($env_key, $env_val) = each %ENV)
       {
         if ($env_key =~ /^(ARVADOS|JOB|TASK)_/) {
-          if ($env_key eq "TASK_KEEPMOUNT") {
+          if ($env_key eq "TASK_WORK") {
+            $command .= "--env=\QTASK_WORK=/tmp/crunch-job\E ";
+          }
+          elsif ($env_key eq "TASK_KEEPMOUNT") {
             $command .= "--env=\QTASK_KEEPMOUNT=/keep\E ";
           }
           else {
@@ -685,13 +691,11 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
       $command .= "--env=\QCRUNCH_SRC=/tmp/crunch-src\E ";
       $command .= "\Q$docker_hash\E ";
       $command .= "stdbuf --output=0 --error=0 ";
-      $command .= "perl - " if ($build_script);
       $command .= "/tmp/crunch-src/crunch_scripts/" . $Job->{"script"};
     } else {
       # Non-docker run
       $command .= "crunchstat -cgroup-root=/sys/fs/cgroup -poll=10000 ";
       $command .= "stdbuf --output=0 --error=0 ";
-      $command .= "perl - " if ($build_script);
       $command .= "$ENV{CRUNCH_SRC}/crunch_scripts/" . $Job->{"script"};
     }
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list