Bug 984608 - Unable to launch Jenkins slave if cloud domain contains a dash
Unable to launch Jenkins slave if cloud domain contains a dash
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers (Show other bugs)
2.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
:
: 987146 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-15 10:28 EDT by Andy Goldstein
Modified: 2017-03-08 12 EST (History)
7 users (show)

See Also:
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 09:23:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andy Goldstein 2013-07-15 10:28:39 EDT
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-01 22:13:58 EDT
*** Bug 987146 has been marked as a duplicate of this bug. ***
Comment 4 Brenton Leanhardt 2013-08-12 16:49:31 EDT
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-12 22:55:43 EDT
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@app1-11.ose-test.com/~/git/app1.git/
   4ade083..e347933  master -> master

And no errors found in jenkins server log.
Comment 8 errata-xmlrpc 2013-09-05 09:23:50 EDT
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

Note You need to log in before you can comment on or make changes to this bug.