[ARVADOS] updated: 97bc18eee0a50a4bc0209932c26ab44e51b4836b

git at public.curoverse.com git at public.curoverse.com
Thu Nov 12 15:31:34 EST 2015


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

       via  97bc18eee0a50a4bc0209932c26ab44e51b4836b (commit)
       via  e8f3520fd515b0aaee92193b0b59c85839e2da4c (commit)
      from  209d83a0ce0bd22669a39f49daddca432babeae7 (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 97bc18eee0a50a4bc0209932c26ab44e51b4836b
Merge: 209d83a e8f3520
Author: Brett Smith <brett at curoverse.com>
Date:   Thu Nov 12 15:31:09 2015 -0500

    Merge branch '6356-crunch-permfail-task-retry-fix-wip'
    
    Closes #6356, #7738.


commit e8f3520fd515b0aaee92193b0b59c85839e2da4c
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 e2a4e26..f78824b 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