Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 984608

Summary: Unable to launch Jenkins slave if cloud domain contains a dash
Product: OpenShift Container Platform Reporter: Andy Goldstein <agoldste>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.2.0CC: achvatal, baulakh, gpei, jialiu, libra-onpremise-devel, nmalik, yanpzhan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jenkins-plugin-openshift-0.6.20-0.el6op.x86_64 Doc Type: Bug Fix
Doc Text:
Jenkins builds were failing due to dashes in user domain names. Parsing of domain names has been improved in the current release, and Jenkins builds now work correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-05 13:23:50 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 Andy Goldstein 2013-07-15 14:28:39 UTC
If you have an OpenShift cloud domain such as my-openshift.com, Jenkins will be unable to launch builder slave gears because of an expectation that the only dash in the fqdn is the dash between the app name and the namespace.

The problem is that when Jenkins goes to launch the slave and download slave.jar, the URL gets messed up (see https://github.com/openshift/jenkins-cloud-plugin/blob/master/src/main/java/hudson/plugins/openshift/OpenShiftComputerLauncher.java#L70). It looks like if you pass something like mybldr-myns.my-openshift.com to getGearDNS, you get back jenkins-myns.my, instead of jenkins-myns.my-openshift.com.

Looking at the implementation for getGearDNS, it looks like it's trying to take the domain from the bldr gear and combine it with the app name of the jenkins gear. But because of the unexpected "-" in the cloud domain, the algorithm using the tokenizer fails.

Would it be possible to simplify this method to just return the value of OPENSHIFT_GEAR_DNS, which (I think) will just be the fqdn of the Jenkins app?

Comment 2 Johnny Liu 2013-08-02 02:13:58 UTC
*** Bug 987146 has been marked as a duplicate of this bug. ***

Comment 4 Brenton Leanhardt 2013-08-12 20:49:31 UTC
FYI, to test this you simply need to create an OSE environment using openshift.sh and export CONF_DOMAIN="exa-mple.com".

Comment 5 Gaoyun Pei 2013-08-13 02:55:43 UTC
Verify this bug on puddle: 1.2/2013-08-12.3 

Set up an OSE env with domain "ose-test.com", create an app and launch jenkins build.


[root@dhcp-8-133 app1]# git push 
[master e347933] update
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 aaa
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 254 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://jj-11.ose-test.com/job/app1-build
remote: 
remote: Waiting for build to schedule.....................................Done
remote: Waiting for job to complete.................................................................Done
remote: SUCCESS
remote: New build has been deployed.
To ssh://52099e5ad6c97fff43000009.com/~/git/app1.git/
   4ade083..e347933  master -> master

And no errors found in jenkins server log.

Comment 8 errata-xmlrpc 2013-09-05 13:23:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1211.html