[ARVADOS] updated: f0a048b4b9792550f59ee23b13c09cca21681eb4

git at public.curoverse.com git at public.curoverse.com
Tue Jun 10 15:00:27 EDT 2014


Summary of changes:
 sdk/cli/bin/arv-run-pipeline-instance | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

       via  f0a048b4b9792550f59ee23b13c09cca21681eb4 (commit)
      from  d161e2280a03b4a1c9675f5ed1946310a9942acd (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 f0a048b4b9792550f59ee23b13c09cca21681eb4
Author: Ward Vandewege <ward at curoverse.com>
Date:   Tue Jun 10 14:59:21 2014 -0400

    arv-run-pipeline-instance should not keep trying to create jobs when the
    API server returns an error on job creation.
    
    This closes #3005

diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index e9b3f00..0fb2c44 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -443,6 +443,7 @@ class WhRunPipelineInstance
     moretodo = true
     interrupted = false
 
+    job_creation_failed = 0
     while moretodo
       moretodo = false
       @components.each do |cname, c|
@@ -485,7 +486,8 @@ class WhRunPipelineInstance
             debuglog "component #{cname} new job #{job[:uuid]}"
             c[:job] = job
           else
-            debuglog "component #{cname} new job failed"
+            debuglog "component #{cname} new job failed", 0
+            job_creation_failed += 1
           end
         end
 
@@ -562,6 +564,11 @@ class WhRunPipelineInstance
         moretodo = false
       end
 
+      # If job creation fails, just give up on this pipeline instance.
+      if job_creation_failed > 0
+        moretodo = false
+      end
+
       if moretodo
         begin
           sleep 10
@@ -591,6 +598,13 @@ class WhRunPipelineInstance
 
     success = (succeeded == @components.length)
 
+    # A job create call failed. Just give up.
+    if job_creation_failed > 0
+      debuglog "job creation failed - giving up on this pipeline instance", 0
+      success = false
+      failed += 1
+    end
+
     if interrupted
      if success
         @instance[:state] = 'Complete'
@@ -603,6 +617,8 @@ class WhRunPipelineInstance
       end
     end
 
+    debuglog "pipeline instance state is #{@instance[:state]}"
+
     # set components_summary
     components_summary = {"todo" => @components.length - ended, "done" => succeeded, "failed" => failed}
     @instance[:components_summary] = components_summary

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list