Bug 813652

Summary: Jenkins build totally does not work now.
Product: OKD Reporter: Johnny Liu <jialiu>
Component: ContainersAssignee: Bill DeCoste <wdecoste>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.xCC: bmeng, rmillner, xtian
Target Milestone: ---Keywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-27 20:46:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Johnny Liu 2012-04-18 06:46:20 UTC
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:

Comment 1 Xiaoli Tian 2012-04-19 07:37:21 UTC
The job name should not be a constant like jboss1-build (/job/jboss1-build/config.xml)

Comment 2 Bill DeCoste 2012-04-19 18:17:54 UTC
fix in jenkins-plugin-openshift 0.5.16

Comment 3 Meng Bo 2012-04-20 02:56:54 UTC
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...

Comment 4 Bill DeCoste 2012-04-20 15:31:53 UTC
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.

Comment 5 Bill DeCoste 2012-04-20 17:29:06 UTC
Exporting the jenkins credential envs in the configure hook. They were not valid until a jenkins restart

Comment 6 Johnny Liu 2012-04-23 05:21:08 UTC
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.