Merge branch 'master' into 7661-fuse-by-pdh
authorradhika <radhika@curoverse.com>
Mon, 9 Nov 2015 15:43:13 +0000 (10:43 -0500)
committerradhika <radhika@curoverse.com>
Mon, 9 Nov 2015 15:43:13 +0000 (10:43 -0500)
1  2 
sdk/cli/bin/crunch-job

index a8de76bec210febd0720102279b0db8cce250335,c2ea186ef5114f17a3198c1aee872103d5c0dc95..e2a4e264c3697e916ca8c88f98cf3a88d80e0e9a
@@@ -893,12 -893,13 +893,13 @@@ for (my $todo_ptr = 0; $todo_ptr <= $#j
          .q{&& SWAP=$(awk '($1 == "SwapTotal:"){print $2}' </proc/meminfo) }
          ."&& MEMLIMIT=\$(( (\$MEM * 95) / ($ENV{CRUNCH_NODE_SLOTS} * 100) )) "
          ."&& let SWAPLIMIT=\$MEMLIMIT+\$SWAP ";
 -    $command .= "&& exec arv-mount --by-id --allow-other $ENV{TASK_KEEPMOUNT} --exec ";
 +    $command .= "&& exec arv-mount --by-pdh --allow-other $ENV{TASK_KEEPMOUNT} --exec ";
      if ($docker_hash)
      {
-       my $cidfile = "$ENV{CRUNCH_TMP}/$Jobstep->{arvados_task}->{uuid}-$Jobstep->{failures}.cid";
+       my $containername = "$Jobstep->{arvados_task}->{uuid}-$Jobstep->{failures}";
+       my $cidfile = "$ENV{CRUNCH_TMP}/$containername.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 \Q$dockeruserarg\E --cidfile=$cidfile --sig-proxy ";
+       $command .= "$docker_bin run --name=$containername --attach=stdout --attach=stderr --attach=stdin -i \Q$dockeruserarg\E --cidfile=$cidfile --sig-proxy ";
        # We only set memory limits if Docker lets us limit both memory and swap.
        # Memory limits alone have been supported longer, but subprocesses tend
        # to get SIGKILL if they exceed that without any swap limit set.