Bug 841077

Summary: jenkins build will hang if there are two jenkins servers in one domain when creating the app
Product: OKD Reporter: Meng Bo <bmeng>
Component: ContainersAssignee: Rob Millner <rmillner>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: mfisher
Target Milestone: ---Keywords: 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-08-07 20:42:59 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 Meng Bo 2012-07-18 05:27:00 UTC
Description of problem:
Create two jenkins servers in on domain, then create an application with jenkins embedded.
Modify the app repo and push it to trigger jenkins server.
Jenkins job will hang there. And the slave build cannot be created.

Version-Release number of selected component (if applicable):
cartridge-jenkins-1.4-0.96.1-1.git.29.308d48e.el6.noarch
cartridge-jenkins-client-1.4-0.30.1-1.git.0.e50b911.el6.noarch

How reproducible:
always

Steps to Reproduce:
1.Create jenkins server jk1
rhc app create -a jk1 -t jenkins-1.4
2.Create a second jenkins server in the same domain
rhc app create -a jk2 -t jenkins-1.4
3.Create app and embed jenkins-client to it
rhc app create -a app1 -t php-5.3 --enable-jenkins
4.Make some change and push the build via jenkins server
  
Actual results:
Jenkins build will hang there, and slave build cannot be created.

Output:
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 243 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://jk2-bmengdev.dev.rhcloud.com/job/php1-build
remote: 
remote: Waiting for build to schedule........................................................................................................................................................................................................................................


Expected results:
Jenkins build should be successful.

Additional info:
Jenkins server side log:

Jul 18, 2012 1:25:32 AM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Provisioning new node for workload = 2 and label = php1-build
Jul 18, 2012 1:25:33 AM hudson.plugins.openshift.OpenShiftCloud hasCapacity
INFO: Checking capacity
Jul 18, 2012 1:25:33 AM hudson.plugins.openshift.OpenShiftCloud hasCapacity
INFO: User has consumed 4 of 10 gears.
Jul 18, 2012 1:25:33 AM hudson.plugins.openshift.OpenShiftCloud reloadConfig
INFO: Reloading configuration for php1-build...
Jul 18, 2012 1:25:33 AM hudson.plugins.openshift.OpenShiftCloud createConnection
INFO: Using credentials system_builder:_ZQL2hLxC3vu
Jul 18, 2012 1:25:33 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.254.129:8080/job/php1-build/config.xml
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403)
	at hudson.plugins.openshift.OpenShiftCloud.reloadConfig(OpenShiftCloud.java:546)
	at hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:491)
	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)

Comment 1 Meng Bo 2012-07-18 05:57:24 UTC
Found this issue on devenv_1899 when verifing another bug: https://bugzilla.redhat.com/show_bug.cgi?id=831062

The difference between the two bug:
Bug 831062: Create the app after the first jenkins server created and before the second one.
This bug: Create the app after the two jenkins servers existed.

Comment 2 Meng Bo 2012-07-31 01:47:39 UTC
Move to ON_QA since Bug 843843 fixed.

Comment 3 Meng Bo 2012-07-31 01:49:39 UTC
Mark this bug as verified because only one jenkins app can be created in one domain.