Merge branch '4040-fuse-tests'
[arvados.git] / sdk / cli / bin / crunch-job
index 1a836f643f544f1fec294cc932230b7357ab809e..617d22f4d1d269d8d9b4fde7caae9fdde2d1e51a 100755 (executable)
@@ -739,10 +739,11 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
       $command .= "--volume=\Q$ENV{CRUNCH_SRC}:$ENV{CRUNCH_SRC}:ro\E ";
       $command .= "--volume=\Q$ENV{CRUNCH_INSTALL}:$ENV{CRUNCH_INSTALL}:ro\E ";
 
-      # For some reason we make arv-mount's mount point appear at
-      # /keep inside the container, instead of using the same path as
-      # the host and expecting the task to pay attention to
-      # $TASK_KEEPMOUNT like we do with everything else.
+      # Currently, we make arv-mount's mount point appear at /keep
+      # inside the container (instead of using the same path as the
+      # host like we do with CRUNCH_SRC and CRUNCH_INSTALL). However,
+      # crunch scripts and utilities must not rely on this. They must
+      # use $TASK_KEEPMOUNT.
       $command .= "--volume=\Q$ENV{TASK_KEEPMOUNT}:/keep:ro\E ";
       $ENV{TASK_KEEPMOUNT} = "/keep";
 
@@ -1796,10 +1797,11 @@ sub shell_or_die
     print STDERR "@_\n";
   }
   if (system (@_) != 0) {
+    my $err = $!;
     my $exitstatus = sprintf("exit %d signal %d", $? >> 8, $? & 0x7f);
     open STDERR, ">&STDERR_ORIG";
     system ("cat $destdir.log >&2");
-    die "@_ failed: $exitstatus";
+    die "@_ failed ($err): $exitstatus";
   }
 }