Bug 1126826 - Cannot create Jenkins cartridge
Summary: Cannot create Jenkins cartridge
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
: 1148938 (view as bug list)
Depends On:
Blocks: 1131011 1171815
TreeView+ depends on / blocked
 
Reported: 2014-08-05 11:38 UTC by Lars Møberg-Poulsen
Modified: 2015-10-29 18:36 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1131011 1171815 1275028 (view as bug list)
Environment:
Last Closed: 2015-04-21 18:00:54 UTC


Attachments (Terms of Use)
Screen shot showing error message. (175.46 KB, image/png)
2014-08-05 17:23 UTC, Lars Møberg-Poulsen
no flags Details

Description Lars Møberg-Poulsen 2014-08-05 11:38:43 UTC
Description of problem:

I cannot create an application with a Jenkins server cartridge in my domain (moeberg).

Each time I try, I get the following error message:

Unexpected error: Cartridge attempted to override the following gear environment variables: JENKINS_PASSWORD, JENKINS_USERNAME

I have tried 20+ times. I have tried from the OpenShift web page. I have tried from the JBoss development studio. I have tried to create a Jenkins gear on its own. I have tried to create it along with my JBoss EA 6 gear, by choosing a Jenkins client cartridge for that gear.

This issue might be related to 1114910. I have had no problems creating Jenkins cartridges in the past. But this morning I had an incident, where the creation of a Jenkins cartridge dragged on for a long time and finally timed out. After this incident I have not been able to create Jenkins cartridges. 

How reproducible:

Steps to Reproduce:
1. Create an application containing only a Jenkins server cartridge in my domain (moeberg).

Actual results:

Above mentioned error message.

Expected results:

A new application containing a Jenkins server cartridge only.

Additional info:

Comment 1 Andy Goldstein 2014-08-05 14:41:36 UTC
I'm having trouble locating your account and domain - what login do you use with OpenShift?

Comment 3 Andy Goldstein 2014-08-05 15:10:46 UTC
Making login info comment private

Comment 4 Andy Goldstein 2014-08-05 15:13:24 UTC
Lars, you should probably change your password since you posted it to a public web site.

Comment 5 Lars Møberg-Poulsen 2014-08-05 15:19:48 UTC
Yes, I realize that. Thanks. Do you need it, or may I change it now?

Comment 6 Andy Goldstein 2014-08-05 16:43:15 UTC
You should change it.

We're still having problems locating your account. Are there any special characters in either your login or your domain? Is the "o" in moeberg an o or is it ø?

Could you please copy and paste the command you run (rhc create-app …) and its full output?

Thanks!

Comment 7 Lars Møberg-Poulsen 2014-08-05 17:22:50 UTC
There are no special characters in the domain name (m o e b e r g).

I don't know which roc command is run behind the scene. All I see is the attached error message after pushing the create button.

Comment 8 Lars Møberg-Poulsen 2014-08-05 17:23:57 UTC
Created attachment 924264 [details]
Screen shot showing error message.

Comment 9 Lars Møberg-Poulsen 2014-08-05 17:28:01 UTC
LMP-MAC:jasperserver-pro lmp$ rhc app create -a jenkins -t jenkins-1
Application Options
-------------------
Domain:     moeberg
Cartridges: jenkins-1
Gear Size:  default
Scaling:    no

Creating application 'jenkins' ... 
Unexpected error: Cartridge attempted to override the following gear environment variables: JENKINS_PASSWORD, JENKINS_USERNAME

Comment 10 Andy Goldstein 2014-08-05 17:30:36 UTC
Thanks. Could you please email the output of "rhc account" and "rhc apps" to agoldste@redhat.com?

Comment 11 Lars Møberg-Poulsen 2014-08-05 17:59:17 UTC
Done!

Comment 14 Andy Goldstein 2014-08-05 20:09:41 UTC
Lars,

It doesn't look like you have any applications in your domain. Are you ok with deleting and recreating the domain using the rhc tools? That should clear things up.

Comment 15 Lars Møberg-Poulsen 2014-08-05 20:26:34 UTC
I did:

LMP-MAC:jasperserver-pro lmp$ rhc domain delete moeberg
Deleting domain 'moeberg' ... deleted
LMP-MAC:jasperserver-pro lmp$ rhc create-domain moeberg
Creating domain 'moeberg' ... done
You may now create an application using the 'rhc create-app' command

And after that:

LMP-MAC:jasperserver-pro lmp$ rhc create-app jenkins jenkins-1
Application Options
-------------------
Domain:     moeberg
Cartridges: jenkins-1
Gear Size:  default
Scaling:    no

Creating application 'jenkins' ... 
Starting jenkins cartridge
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Waiting ...
Timed out waiting for Jenkins to fully start
Failed to execute: 'control start' for /var/lib/openshift/53e13c69e0b8cdb79000016c/jenkins

This is the same as I saw this morning.

I then tried again:

LMP-MAC:jasperserver-pro lmp$ rhc create-app jenkins jenkins-1
Application Options
-------------------
Domain:     moeberg
Cartridges: jenkins-1
Gear Size:  default
Scaling:    no

Creating application 'jenkins' ... 
Unexpected error: Cartridge attempted to override the following gear environment variables: JENKINS_PASSWORD, JENKINS_USERNAME

So, we are back where we started. But now at least we have a clear picture of the line of events.

Comment 16 Lars Møberg-Poulsen 2014-08-05 20:34:45 UTC
Just tried to start on a large gear (and it worked):

LMP-MAC:jasperserver-pro lmp$ rhc create-app -g large jenkins jenkins-1
Application Options
-------------------
Domain:     moeberg
Cartridges: jenkins-1
Gear Size:  large
Scaling:    no

Creating application 'jenkins' ... done

  Jenkins created successfully.  Please make note of these credentials:

   User: admin
   Password: _msRG39b_Ztc

Note:  You can change your password at: https://jenkins-moeberg.rhcloud.com/me/configure

Waiting for your DNS name to be available ... done

Cloning into 'jenkins'...
Warning: Permanently added the RSA host key for IP address '54.198.188.227' to the list of known hosts.

Your application 'jenkins' is now available.

  URL:        http://jenkins-moeberg.rhcloud.com/
  SSH to:     53e13efbe0b8cde51e000374@jenkins-moeberg.rhcloud.com
  Git remote: ssh://53e13efbe0b8cde51e000374@jenkins-moeberg.rhcloud.com/~/git/jenkins.git/
  Cloned to:  /Applications/jasperreports-server-5.6/apache-tomcat/webapps/jasperserver-pro/jenkins

Run 'rhc show-app jenkins' for more details about your app.

Comment 17 Lars Møberg-Poulsen 2014-08-05 20:40:25 UTC
Medium works as well:

LMP-MAC:jasperserver-pro lmp$ rhc create-app -g medium jenkins2 jenkins-1
Application Options
-------------------
Domain:     moeberg
Cartridges: jenkins-1
Gear Size:  medium
Scaling:    no

Creating application 'jenkins2' ... done

  Jenkins created successfully.  Please make note of these credentials:

   User: admin
   Password: ZG7bU4WeC4AV

Note:  You can change your password at: https://jenkins2-moeberg.rhcloud.com/me/configure

Waiting for your DNS name to be available ... done

Comment 18 Abhishek Gupta 2014-08-05 21:27:36 UTC
I believe I have sufficient information to debug/fix this issue.

Comment 20 Abhishek Gupta 2014-08-18 16:38:02 UTC
Fixed with --> https://github.com/openshift/origin-server/pull/5717

Comment 22 openshift-github-bot 2014-08-18 17:41:29 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/9e02f63c0044b3c76eb77c492672c08ac3436196
Bug 1126826: cleaning up domain env vars and ssh keys on rollback

Comment 23 Jianwei Hou 2014-08-19 02:32:34 UTC
Verified on devenv_5089

Steps:
1. Create domain
2. Create jenkins app, stop ruby193-mcollective while the creation is underway, this makes the creation fail and all pending ops will rollback.
3. Start ruby193-mcollective
4. Clear pending ops
5. Make sure the jenkins env vars are cleaned up by querying domain records in datastore
6. Create another jenkins app

Result:
App is cleaned up, the env_vars are cleaned up from user domains. New jenkins app created successfully.

Comment 24 Ben Parees 2014-10-02 20:18:01 UTC
*** Bug 1148938 has been marked as a duplicate of this bug. ***

Comment 25 belong 2014-10-21 05:28:15 UTC
Abhishek,

Has this fix been pushed live to OpenShift Online?

I have encountered this problem.

Regards,
Ben

Comment 26 Abhishek Gupta 2014-11-03 21:11:23 UTC
This comment got missed since the bug was in "Verified" state.

This fix should definitely be in production now. If you still encounter the issue, please send me your application and domain details.

Comment 27 belong 2014-11-03 22:50:10 UTC
No worries.

I ended up removing my domain and starting again.

Comment 28 pdedecker 2014-11-30 18:34:59 UTC
I'm still encountering this issue. The OpenShift Online website displays the following error message: "Unexpected error: Cartridge attempted to override the following gear environment variables: JENKINS_PASSWORD, JENKINS_USERNAME"

I get a similar result from the console:

===
>rhc app create -a jenkins -t jenkins-1
Application Options
-------------------
Domain:     pdedecker
Cartridges: jenkins-1
Gear Size:  default
Scaling:    no

Creating application 'jenkins' ...
Unexpected error: Cartridge attempted to override the following gear environment

variables: JENKINS_USERNAME, JENKINS_PASSWORD
===

I use the same e-mail address to log in to Bugzilla and my OpenShift account. I also tried explicitly specifying the small gear size to the app creation command, but I still got the error.

Comment 29 Luke Meyer 2014-12-12 19:36:18 UTC
(In reply to pdedecker from comment #28)
> I'm still encountering this issue.

The fix should prevent a Jenkins app create from leaving domain env vars in Mongo when it has to be rolled back. However, it doesn't fix the situation if that already occurred prior to the fix.

Is it possible you had a failed Jenkins app creation prior to the fix for this problem? How old is your domain, and is this error still happening?

Comment 30 pdedecker 2014-12-12 19:55:14 UTC
(In reply to Luke Meyer from comment #29)
> Is it possible you had a failed Jenkins app creation prior to the fix for
> this problem? How old is your domain, and is this error still happening?

I created my OpenShift account in early November 2014, so my domain should be fairly recent. Since the fix was created in August 2014, I don't think that it's possible. I ran the console command again and I'm still getting the same error.

Comment 31 Luke Meyer 2014-12-12 20:03:36 UTC
Seems to me this merits re-examination.

Comment 32 Abhishek Gupta 2015-01-12 22:53:24 UTC
This should now be fixed - please confirm.

Comment 33 pdedecker 2015-01-13 19:13:04 UTC
I used the OpenShift website to create a new Jenkins cartridge and I got a reassuring "Jenkins created successfully" message this time. As far as I'm concerned, this issue can be marked as fixed.

Comment 34 Abhishek Gupta 2015-01-13 20:34:12 UTC
Thanks for the quick check/response.

Comment 35 Zhao Qiang 2015-01-14 03:32:30 UTC
[test1@local ~]$ rhc account
Login qizhao@redhat.com on openshift.redhat.com
-----------------------------------------------
  ID:                 543783a2e0b8cdbf9400012b
  Plan:               Free
  Gears Used:         0
  Gears Allowed:      3
  Domains Allowed:    1
  Allowed Gear Sizes: small
  SSL Certificates:   no

[test1@local ~]$ rhc create-app jenkins jenkins-1
Application Options
-------------------
Domain:     bugack
Cartridges: jenkins-1
Gear Size:  default
Scaling:    no

Creating application 'jenkins' ... done

  Jenkins created successfully.  Please make note of these credentials:

   User: admin
   Password: uHsd9knu3_sw

Note:  You can change your password at: https://jenkins-bugack.rhcloud.com/me/configure

Waiting for your DNS name to be available ... done

Cloning into 'jenkins'...
The authenticity of host 'jenkins-bugack.rhcloud.com (54.145.82.39)' can't be established.
RSA key fingerprint is cf:ee:77:cb:0e:fc:02:d7:72:7e:ae:80:c0:90:88:a7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'jenkins-bugack.rhcloud.com,54.145.82.39' (RSA) to the list of known hosts.

Your application 'jenkins' is now available.

  URL:        http://jenkins-bugack.rhcloud.com/
  SSH to:     54b5dd8b5973caae8b000100@jenkins-bugack.rhcloud.com
  Git remote: ssh://54b5dd8b5973caae8b000100@jenkins-bugack.rhcloud.com/~/git/jenkins.git/
  Cloned to:  /home/test1/jenkins

Run 'rhc show-app jenkins' for more details about your app.

[test1@local ~]$ rhc apps
jenkins @ http://jenkins-bugack.rhcloud.com/ (uuid: 54b5dd8b5973caae8b000100)
-----------------------------------------------------------------------------
  Domain:     bugack
  Created:    11:07 AM
  Gears:      1 (defaults to small)
  Git URL:    ssh://54b5dd8b5973caae8b000100@jenkins-bugack.rhcloud.com/~/git/jenkins.git/
  SSH:        54b5dd8b5973caae8b000100@jenkins-bugack.rhcloud.com
  Deployment: auto (on git push)

  jenkins-1 (Jenkins Server)
  --------------------------
    Gears: 1 small

You have access to 1 application.

Comment 36 Luke Meyer 2015-02-03 16:09:42 UTC
(In reply to Abhishek Gupta from comment #32)
> This should now be fixed - please confirm.

Was there any specific commit that fixed this beyond the one in comment 22? Just want to be sure it's resolved for Enterprise.

Comment 37 Abhishek Gupta 2015-02-27 22:51:32 UTC
No code changes were made, there were some applications that had stuck operations that we cleared.

Comment 38 Sergio Santos 2015-04-23 13:28:19 UTC
Guys,

Are you sure this bug is already fixed?
This is happening to me right now:

##

[ssantos@ssantos openshift_training]$ rhc app create --app jenkinsapp --type jenkins
Using jenkins-1 (Jenkins Server) for 'jenkins'

Application Options
-------------------
Domain:     sergiofilho
Cartridges: jenkins-1
Gear Size:  default
Scaling:    no

Creating application 'jenkinsapp' ... 
Unexpected error: Cartridge attempted to override the following gear environment variables: JENKINS_USERNAME, JENKINS_PASSWORD

##

My login is: sergiofilho@gmail.com

Comment 39 Andy Grimm 2015-04-24 14:31:43 UTC
Sergio, I have fixed your domain.  You should be able to create a new jenkins app now.

Comment 40 Sergio Santos 2015-04-24 18:07:34 UTC
Thanks Andy.
I've just tested and it is working fine now.

Comment 41 Gustavo E Bonilla 2015-10-25 02:54:14 UTC
Hello everyone, I don't know what I am doing wrong but is happening to me the same. 

rhc create-app jenkins jenkins-1
Application Options
-------------------
Domain:     gebonilla
Cartridges: jenkins-1
Gear Size:  default
Scaling:    no

Creating application 'jenkins' ... 
Unexpected error: Cartridge attempted to override the following gear environment variables: JENKINS_USERNAME,
JENKINS_PASSWORD 

The one a can create is small, I am not able to create with a large or medium gear cause my account type. 

Thanks for your help.

Comment 42 Gustavo E Bonilla 2015-10-25 02:55:39 UTC
(In reply to Gustavo E Bonilla from comment #41)
> Hello everyone, I don't know what I am doing wrong but is happening to me
> the same. 
> 
> rhc create-app jenkins jenkins-1
> Application Options
> -------------------
> Domain:     gebonilla
> Cartridges: jenkins-1
> Gear Size:  default
> Scaling:    no
> 
> Creating application 'jenkins' ... 
> Unexpected error: Cartridge attempted to override the following gear
> environment variables: JENKINS_USERNAME,
> JENKINS_PASSWORD 
> 
> The one a can create is small, I am not able to create with a large or
> medium gear cause my account type. 
> 
> Thanks for your help.

my login is gebonilla@gmail.com thanks.... again!!!

Comment 43 Ben Parees 2015-10-25 03:18:25 UTC
You'd be better served by opening a new bug with the details of your specific issue. It's hard to work an issue on a closed bug.

Comment 44 Andy Grimm 2015-10-29 18:36:08 UTC
I fixed the gebonilla domain.


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