[ARVADOS] created: dbbe80b84a42bc153d61fc43d3c94eff7920ceb6
git at public.curoverse.com
git at public.curoverse.com
Mon Nov 9 14:41:53 EST 2015
at dbbe80b84a42bc153d61fc43d3c94eff7920ceb6 (commit)
commit dbbe80b84a42bc153d61fc43d3c94eff7920ceb6
Author: Brett Smith <brett at curoverse.com>
Date: Mon Nov 9 08:30:14 2015 -0500
6356: crunch-job doesn't create new tasks after job success is set.
#6356 reported that a permanently failed task was retried. Note 3
discusses why this happened and suggests two fixes:
* Only put tempfailed task back on the todo list.
* Run `last THISROUND if $main::please_freeze || defined($main::success);`
after we call reapchildren(), since it's the main place where the
value of $main::success can change.
The first change would revert part of
75be7487c2bbd83aa5116aa5f8ade5ddf31501da, which intentionally puts
these tasks back on the todo list to get a correct tasks count.
The current `last if…` line was added in
b306eb48ab12676ffb365ede8197e4f2d7e92011, with the rationale "Don't
create new tasks if $main::success is defined." This change corrects
the code to implement the desired functionality, by checking and
stopping just before we create a new task (functionally, at least).
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index c2ea186..3f400bf 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -820,6 +820,9 @@ update_progress_stats();
THISROUND:
for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
{
+ # Don't create new tasks if we already know the job's final result.
+ last if defined($main::success);
+
my $id = $jobstep_todo[$todo_ptr];
my $Jobstep = $jobstep[$id];
if ($Jobstep->{level} != $level)
@@ -1018,7 +1021,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
||
($round_num_freeslots > @freeslot && $todo_ptr+1 > $#jobstep_todo))
{
- last THISROUND if $main::please_freeze || defined($main::success);
+ last THISROUND if $main::please_freeze;
if ($main::please_info)
{
$main::please_info = 0;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list