title: Openshift Jenkins build pending until it fails after long inactivity
body: <p>I'm trying to make sure that all tests complete before making a deployment. For this I have enabled Jenkins for my app. I can run builds successfully from git push and from Jenkins UI if myapp-bldr node is up and running, however if I try to run a build after a period of inactivity (basically wait for myapp-bldr to go down and free up a gear in my account), Jenkins build fails with below details: </p>
  
  <pre><code>&gt; rhc app-deploy HEAD --app myapp
  Deployment of git ref 'HEAD' in progress for application myapp ...
  Executing Jenkins build.
  
  You can track your build at https://jenkins-mydomain.rhcloud.com/job/myapp-build
  
  Waiting for build to schedule............................................................................................
  **BUILD FAILED/CANCELLED**
  Please see the Jenkins log for more details via 'rhc tail'
  !!!!!!!!
  Deployment Halted!
  If the build failed before the deploy step, your previous 
  build is still running.  Otherwise, your application may be
  partially deployed or inaccessible.
  Fix the build and try again.
  !!!!!!!!
  An error occurred executing 'gear deploy' (exit code: 1)
  Error message: CLIENT_ERROR: Failed to execute: 'control post-receive' for /var/lib/openshift/581e42c10c1e6666270001d8/jenkins-client
  </code></pre>
  
  <p>While <code>Waiting for build to schedule...</code> line is displayed in console, I can see build being queued in Jenkins UI, but since no builder nodes are available, it doesn't get picked up.</p>
  
  <p>I'm guessing the issue is related to some timeout setting somewhere, but I can't tell for sure which one and whether I have the ability to tweak it.</p>
  
  <p>I found this <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1368967" rel="nofollow noreferrer">bug</a> reported linking to the following <a href="https://github.com/openshift/origin/pull/10593/files" rel="nofollow noreferrer">pull request</a> but I don't know if this is related and how to check if my app has the above config change applied to it.</p>
  
  <p>I'm using "old" console (v2, not "NextGen" v3) with Jenkins ver. 1.642.2</p>