[ARVADOS] created: 2cf7e5dd000eac11b5ffd3c2155e85906c03a4b0
Git user
git at public.curoverse.com
Thu Mar 31 17:54:31 EDT 2016
at 2cf7e5dd000eac11b5ffd3c2155e85906c03a4b0 (commit)
commit 2cf7e5dd000eac11b5ffd3c2155e85906c03a4b0
Author: Brett Smith <brett at curoverse.com>
Date: Thu Mar 31 17:54:18 2016 -0400
8807: crunch-job saves logs before exiting to retry.
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 4bd58a8..6dcaa2c 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -200,6 +200,7 @@ my ($exited, $stdout, $stderr) = srun_sync(
{label => "sanity check"});
if ($exited != 0) {
Log(undef, "Sanity check failed: ".exit_status_s($exited));
+ save_meta();
exit EX_TEMPFAIL;
}
Log(undef, "Sanity check OK");
@@ -213,6 +214,7 @@ if (!$local_job) {
eval { api_call("jobs/lock", uuid => $Job->{uuid}); };
if ($@) {
Log(undef, "Error while locking job, exiting ".EX_TEMPFAIL);
+ save_meta();
exit EX_TEMPFAIL;
};
}
@@ -409,6 +411,7 @@ if (!defined $no_clear_tmp) {
['bash', '-ec', '-o', 'pipefail', 'mount -t fuse,fuse.keep | awk "(index(\$3, \"$CRUNCH_TMP\") == 1){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'],
{label => "clean work dirs"});
if ($exited != 0) {
+ save_meta();
exit(EX_RETRY_UNLOCKED);
}
}
@@ -436,6 +439,7 @@ fi
{label => "load docker image"});
if ($exited != 0)
{
+ save_meta();
exit(EX_RETRY_UNLOCKED);
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list