Bug 846971 - Get error when adding jobs in jenkins server whose name is capitalized.
Get error when adding jobs in jenkins server whose name is capitalized.
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Dan Mace
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 06:43 EDT by Mengjiao Gao
Modified: 2015-05-14 18:57 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:48:10 EST
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)
Error msg page when enable jenkins build. (196.99 KB, image/png)
2012-08-09 06:43 EDT, Mengjiao Gao
no flags Details
the development.log of /var/www/stickshift/broker/log/development.log. (31.31 KB, application/octet-stream)
2012-08-09 06:45 EDT, Mengjiao Gao
no flags Details

  None (edit)
Description Mengjiao Gao 2012-08-09 06:43:45 EDT
Created attachment 603231 [details]
Error msg page when enable jenkins build.

Description of problem:
First, I created an php application named "php2", and a jenkins server application named "JENKINS". Then I tried to "Enable Jenkins Build" to "php2" and got error message like the attachment #1 [details] shown.
And I got the development.log of broker which is attached as well.

Version-Release number of selected component (if applicable):
devenv_1955

How reproducible:
always

Steps to Reproduce:
1.Create a php application named "php2"
2.Create a jenkins server application named "JENKINS"
3.Go to php2 overview page, click the  "Enable Jenkins Build" button, then click "Add jenkins" in the following page.
  
Actual results:
Get error message,and failed to add jenkins client.

Expected results:
It should be added correctly with successful message.

Additional info:
If I created jenkins server with a lowercase name, jenkins client will be added successfully.
Comment 1 Mengjiao Gao 2012-08-09 06:45:05 EDT
Created attachment 603233 [details]
the development.log of /var/www/stickshift/broker/log/development.log.
Comment 3 Xiaoli Tian 2012-08-09 09:01:10 EDT
Client side will meet same issue, if it's the same issue in US1787 after Devs confirmed, we could close it as upstream

#rhc app cartridge add -a scalephp1 -c jenkins-client-1.4 -p 1
Problem reported from server. Response code was 500.
Re-run with -d for more information.

RESULT:

Could not add job 'scalephp1-build' in Jenkins server:
   
You'll need to correct this error before attempting to embed the Jenkins client again.
Comment 4 Mengjiao Gao 2012-09-05 01:33:13 EDT
Tested this issue on INT(devenv_2111), the same issue exits if I used a capitalized domain name.
Comment 5 Yujie Zhang 2012-09-11 03:03:42 EDT
Tested this issue on INT today, it will give error message when using a domain name which has capitalized letter, like "Hhh", could you please check if we can fix this in this sprint?
Comment 6 Paul Morie 2012-09-19 16:29:00 EDT
Recreated this today by doing the following:

1. Create jenkins app named 'JENKINS'
2. Create php app named 'phptest'
3. Add jenkins-client cartridge to phptest app.

Output:

★ pmorie:~/code/apps 
$ rhc app cartridge add -a phptest -c jenkins-client-1.4
Password: 

Problem reported from server. Response code was 500.
Re-run with -d for more information.

RESULT:

Could not add job 'phptest-build' in Jenkins server:
   create_job status: 400
You'll need to correct this error before attempting to embed the Jenkins client again.
Comment 7 Xiaoli Tian 2012-09-19 21:43:09 EDT
(In reply to comment #6)
I think it happens not only on Jenkins, almost all the other cartridges, there's a user story about this: US1787.
Comment 8 Paul Morie 2012-09-20 17:06:04 EDT
Jenkins doesn't like getting posted to with the capitalized JENKINS in the url.  I've added calls to .downcase in a couple places as a fix.
Comment 9 Paul Morie 2012-09-20 17:31:31 EDT
Pull request for fix: https://github.com/openshift/crankcase/pull/514
Comment 10 Xiaoli Tian 2012-09-24 22:18:18 EDT
(In reply to comment #9)
> Pull request for fix: https://github.com/openshift/crankcase/pull/514

Move it to ON_QA since above pull request is merged to master
Comment 11 Mengjiao Gao 2012-09-25 01:01:50 EDT
For bug 859828 have not been fixed, I cannot verify this bug now, will verify it when bug 859828 fixed.
Comment 12 Mengjiao Gao 2012-09-25 22:37:21 EDT
Tested this issue on INT(devenv_2221).When I used "Jenkins" as the name of jenkins server name, and used "DDDD" as domain name, I can add jenkins to apps successfully. SO I will verify this bug.

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