Hide Forgot
Description of problem: Jenkins build always failed with the following log message: <--snip--> Apr 18, 2012 2:27:11 AM hudson.plugins.openshift.OpenShiftCloud provision INFO: Provisioning new node for workload = 2 and label = phptest-build Apr 18, 2012 2:27:11 AM hudson.plugins.openshift.OpenShiftCloud getOpenShiftService INFO: Initiating Java Client Service - Configured for OpenShift Server https://localhost Apr 18, 2012 2:27:12 AM hudson.plugins.openshift.OpenShiftCloud shouldProvision INFO: Checking capacity Apr 18, 2012 2:27:13 AM hudson.plugins.openshift.OpenShiftCloud shouldProvision INFO: User has consumed 2 of 3 gears. Apr 18, 2012 2:27:13 AM hudson.plugins.openshift.OpenShiftCloud shouldProvision INFO: Capacity remaining - checking for existing type... Apr 18, 2012 2:27:13 AM hudson.plugins.openshift.OpenShiftCloud shouldProvision INFO: No suitable builders found. Apr 18, 2012 2:27:13 AM hudson.plugins.openshift.OpenShiftCloud reloadConfig INFO: Reloading configuration... Apr 18, 2012 2:27:13 AM hudson.plugins.openshift.OpenShiftCloud provision SEVERE: Exception caught trying to provision java.io.IOException: Server returned HTTP response code: 401 for URL: http://127.0.250.1:8080/job/jboss1-build/config.xml at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403) at hudson.plugins.openshift.OpenShiftCloud.reloadConfig(OpenShiftCloud.java:525) at hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:475) at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:227) at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51) at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:310) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54) at java.util.TimerThread.mainLoop(Timer.java:534) at java.util.TimerThread.run(Timer.java:484) Apr 18, 2012 2:27:13 AM hudson.plugins.openshift.OpenShiftCloud provision INFO: Provisioning new node for workload = 2 and label = phptest-build <--snip--> Version-Release number of selected component (if applicable): jenkins-plugin-openshift-0.5.14-0.el6_2.x86_64 cartridge-jenkins-client-1.4-0.25.2-1.el6_2.noarch cartridge-jenkins-1.4-0.91.2-1.el6_2.noarch How reproducible: Always Steps to Reproduce: 1. Create app with jenkins client embeded. (Here I create a php app) 2. Do git push to trigger jenkins build. 3. Actual results: Jenkins build hang there for ever. Expected results: Jenkins build should be finished successfully. Additional info:
The job name should not be a constant like jboss1-build (/job/jboss1-build/config.xml)
fix in jenkins-plugin-openshift 0.5.16
checked on devenv_1732 with jenkins-plugin-openshift-0.5.16-0.el6_2.x86_64, issue still can be reproduced. ============== Apr 19, 2012 10:54:21 PM hudson.plugins.openshift.OpenShiftCloud shouldProvision INFO: Capacity remaining - checking for existing type... Apr 19, 2012 10:54:21 PM hudson.plugins.openshift.OpenShiftCloud shouldProvision INFO: User has consumed 2 of 3 gears. Apr 19, 2012 10:54:19 PM hudson.plugins.openshift.OpenShiftCloud shouldProvision INFO: Checking capacity Apr 19, 2012 10:54:16 PM hudson.plugins.openshift.OpenShiftCloud provision INFO: Provisioning new node for workload = 2 and label = perl-build Apr 19, 2012 10:54:16 PM hudson.plugins.openshift.OpenShiftCloud provision SEVERE: Exception caught trying to provision java.io.IOException: Server returned HTTP response code: 401 for URL: http://127.0.253.1:8080/job/perl-build/config.xml at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403) at hudson.plugins.openshift.OpenShiftCloud.reloadConfig(OpenShiftCloud.java:531) at hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:476) at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:227) at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51) at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:310) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54) at java.util.TimerThread.mainLoop(Timer.java:534) at java.util.TimerThread.run(Timer.java:484) Apr 19, 2012 10:54:16 PM hudson.plugins.openshift.OpenShiftCloud reloadConfig INFO: Reloading configuration...
Strange - I see the above error with a clean devenv but when I replace the plugin jar with the local it works fine. I've created a 0.5.17 with some additional logging to track the authentication problem above.
Exporting the jenkins credential envs in the configure hook. They were not valid until a jenkins restart
Verified this bug on devenv_1735, and PASS. But also found some other issues, refer to BZ#810472 and BZ#815185 for tracking these issues.