[ARVADOS] updated: 382924ca272e477a3739aec567fa2177e33da6fa

git at public.curoverse.com git at public.curoverse.com
Mon Mar 16 13:49:32 EDT 2015


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

       via  382924ca272e477a3739aec567fa2177e33da6fa (commit)
      from  c3074f48c15ae7d1f4bc30939959c7243708cb37 (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 382924ca272e477a3739aec567fa2177e33da6fa
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Mar 16 13:50:56 2015 -0400

    5448: Clean up old cid files during job start.

diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 92fe886..cc47bbe 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -361,7 +361,7 @@ if (!defined $no_clear_tmp) {
     # TODO: When #5036 is done and widely deployed, we can get rid of the
     # regular expression and just unmount everything with type fuse.keep.
     srun (["srun", "--nodelist=$nodelist", "-D", $ENV{'TMPDIR'}],
-          ['bash', '-ec', 'mount -t fuse,fuse.keep | awk \'($3 ~ /\ykeep\y/){print $3}\' | xargs -r -n 1 fusermount -u -z; sleep 1; rm -rf $JOB_WORK $CRUNCH_INSTALL $CRUNCH_TMP/task $CRUNCH_TMP/src*']);
+          ['bash', '-ec', 'mount -t fuse,fuse.keep | awk \'($3 ~ /\ykeep\y/){print $3}\' | xargs -r -n 1 fusermount -u -z; sleep 1; rm -rf $JOB_WORK $CRUNCH_INSTALL $CRUNCH_TMP/task $CRUNCH_TMP/src* $CRUNCH_TMP/*.cid']);
     exit (1);
   }
   while (1)
@@ -671,10 +671,6 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
 			    $slot[$childslot]->{node}->{name},
 			    $slot[$childslot]->{cpu});
 
-  if ($docker_hash) {
-      $Jobstep->{cidfile} = "$ENV{CRUNCH_TMP}/$Jobstep->{arvados_task}->{uuid}-$Jobstep->{failures}.cid";
-  }
-
   my $childpid = fork();
   if ($childpid == 0)
   {
@@ -726,8 +722,9 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
     $command .= "&& exec arv-mount --by-id --allow-other $ENV{TASK_KEEPMOUNT} --exec ";
     if ($docker_hash)
     {
-      $command .= "crunchstat -cgroup-root=/sys/fs/cgroup -cgroup-parent=docker -cgroup-cid=$Jobstep->{cidfile} -poll=10000 ";
-      $command .= "$docker_bin run --rm=true --attach=stdout --attach=stderr --attach=stdin -i --user=crunch --cidfile=$Jobstep->{cidfile} --sig-proxy ";
+      my $cidfile = "$ENV{CRUNCH_TMP}/$Jobstep->{arvados_task}->{uuid}-$Jobstep->{failures}.cid";
+      $command .= "crunchstat -cgroup-root=/sys/fs/cgroup -cgroup-parent=docker -cgroup-cid=$cidfile -poll=10000 ";
+      $command .= "$docker_bin run --rm=true --attach=stdout --attach=stderr --attach=stdin -i --user=crunch --cidfile=$cidfile --sig-proxy ";
 
       # Dynamically configure the container to use the host system as its
       # DNS server.  Get the host's global addresses from the ip command,
@@ -1069,11 +1066,6 @@ sub reapchildren
   push @freeslot, $proc{$pid}->{slot};
   delete $proc{$pid};
 
-  if (defined($Jobstep->{cidfile})) {
-    unlink $Jobstep->{cidfile};
-    delete $Jobstep->{cidfile};
-  }
-
   if ($task_success) {
     # Load new tasks
     my $newtask_list = [];

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list