openshift / jenkins-plugin

Apache License 2.0
81 stars 50 forks source link

Timeout of builds #131

Closed livelace closed 7 years ago

livelace commented 7 years ago

Hi. I cannot figure out what is happening:

  1. I decided to rework some base jobs (want to use Multijob phase)
  2. I made one Jenkins job, which builds multiple images
  3. Global "OpenShift Build Verification" and "OpenShift Builder" are set to 480 minutes. Local timeouts are not set.
  4. I started that job and after some amount (about 30-40 minutes) of time all builds were canceled with:

Exiting "Cancel OpenShift Builds" successfully with 1 builds cancelled. java.lang.InterruptedException: sleep interrupted at java.lang.Thread.sleep(Native Method) at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftBuilder.waitOnBuild(IOpenShiftBuilder.java:188) at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftBuilder.coreLogic(IOpenShiftBuilder.java:272) at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftPlugin.doItCore(IOpenShiftPlugin.java:308) at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftPlugin.doIt(IOpenShiftPlugin.java:326) at com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep.perform(OpenShiftBaseStep.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1728) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) ERROR: "Trigger OpenShift Build" failed [PostBuildScript] - Execution post build scripts.

complete log

version: 1.0.42

gabemontero commented 7 years ago

@livelace - the interrupted exception means that either Jenkins or this Multijob plugin is killing our job before jenkins-plugin stops waiting. Per Jenkins rules for plugins, we are suppose to throw Interrupted Exception if we receive them. Among other things, it allows the user to manually cancel a job from the console if they so choose.

Based on the logs provided, the plugin did consume the 480 minute timeout you set. But of course Jenkins and/or MultiJob does not process that setting.

Apologies, but I don't know off hand how to increase the timeout for either Jenkins or Multijob.

livelace commented 7 years ago

@gabemontero Hello. How do you think, maybe Multijob sums time of all tasks ? I mean:

  1. task1, task1, task3 - each consume 5 minutes.
  2. multijobs phase contains: task1, task2, task3
  3. timeout happens when sum of task1, task2, task3 is bigger than "BuildTimeout" ?
gabemontero commented 7 years ago

On Sun, Mar 5, 2017 at 11:15 AM, Oleg Popov notifications@github.com wrote:

@gabemontero https://github.com/gabemontero Hello. How do you think, maybe Multijob sums time of all tasks ? I mean:

  1. task1, task1, task3 - each consume 5 minutes.
  2. multijobs phase contains: task1, task2, task3
  3. timeout happens when sum of task1, task2, task3 is bigger than "BuildTimeout" ?

@livelace that is conceivable, but I couldn't say for sure; I have never used or looked into that plugin

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openshift/jenkins-plugin/issues/131#issuecomment-284240253, or mute the thread https://github.com/notifications/unsubscribe-auth/ADbadHul10vPhlPje-eS42qPqLhaLnH7ks5rit-ggaJpZM4MPcLL .