Bug 1275028 - Cannot create Jenkins cartridge [NEEDINFO]
Cannot create Jenkins cartridge
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
1.x
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Abhishek Gupta
Jianwei Hou
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-24 23:44 EDT by Gustavo E Bonilla
Modified: 2015-12-18 15:27 EST (History)
20 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1126826
Environment:
Last Closed: 2015-12-18 15:27:34 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rthrashe: needinfo? (gebonilla)


Attachments (Terms of Use)

  None (edit)
Description Gustavo E Bonilla 2015-10-24 23:44:55 EDT
+++ This bug was initially created as a clone of Bug #1126826 +++

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:

--- Additional comment from Andy Goldstein on 2014-08-05 10:41:36 EDT ---

I'm having trouble locating your account and domain - what login do you use with OpenShift?

--- Additional comment from Andy Goldstein on 2014-08-05 11:10:46 EDT ---

Making login info comment private

--- Additional comment from Andy Goldstein on 2014-08-05 11:13:24 EDT ---

Lars, you should probably change your password since you posted it to a public web site.

--- Additional comment from Lars Møberg-Poulsen on 2014-08-05 11:19:48 EDT ---

Yes, I realize that. Thanks. Do you need it, or may I change it now?

--- Additional comment from Andy Goldstein on 2014-08-05 12:43:15 EDT ---

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!

--- Additional comment from Lars Møberg-Poulsen on 2014-08-05 13:22:50 EDT ---

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.

--- Additional comment from Lars Møberg-Poulsen on 2014-08-05 13:23:57 EDT ---



--- Additional comment from Lars Møberg-Poulsen on 2014-08-05 13:28:01 EDT ---

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

--- Additional comment from Andy Goldstein on 2014-08-05 13:30:36 EDT ---

Thanks. Could you please email the output of "rhc account" and "rhc apps" to agoldste@redhat.com?

--- Additional comment from Lars Møberg-Poulsen on 2014-08-05 13:59:17 EDT ---

Done!

--- Additional comment from Andy Goldstein on 2014-08-05 16:09:41 EDT ---

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.

--- Additional comment from Lars Møberg-Poulsen on 2014-08-05 16:26:34 EDT ---

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.

--- Additional comment from Lars Møberg-Poulsen on 2014-08-05 16:34:45 EDT ---

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.

--- Additional comment from Lars Møberg-Poulsen on 2014-08-05 16:40:25 EDT ---

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

--- Additional comment from Abhishek Gupta on 2014-08-05 17:27:36 EDT ---

I believe I have sufficient information to debug/fix this issue.

--- Additional comment from Abhishek Gupta on 2014-08-18 12:38:02 EDT ---

Fixed with --> https://github.com/openshift/origin-server/pull/5717

--- Additional comment from openshift-github-bot on 2014-08-18 13:41:29 EDT ---

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

--- Additional comment from Hou Jianwei on 2014-08-18 22:32:34 EDT ---

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.

--- Additional comment from Ben Parees on 2014-10-02 16:18:01 EDT ---



--- Additional comment from  on 2014-10-21 01:28:15 EDT ---

Abhishek,

Has this fix been pushed live to OpenShift Online?

I have encountered this problem.

Regards,
Ben

--- Additional comment from Abhishek Gupta on 2014-11-03 16:11:23 EST ---

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.

--- Additional comment from  on 2014-11-03 17:50:10 EST ---

No worries.

I ended up removing my domain and starting again.

--- Additional comment from  on 2014-11-30 13:34:59 EST ---

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.

--- Additional comment from Luke Meyer on 2014-12-12 14:36:18 EST ---

(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?

--- Additional comment from  on 2014-12-12 14:55:14 EST ---

(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.

--- Additional comment from Luke Meyer on 2014-12-12 15:03:36 EST ---

Seems to me this merits re-examination.

--- Additional comment from Abhishek Gupta on 2015-01-12 17:53:24 EST ---

This should now be fixed - please confirm.

--- Additional comment from  on 2015-01-13 14:13:04 EST ---

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.

--- Additional comment from Abhishek Gupta on 2015-01-13 15:34:12 EST ---

Thanks for the quick check/response.

--- Additional comment from Zhao Qiang on 2015-01-13 22:32:30 EST ---

[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.

--- Additional comment from Luke Meyer on 2015-02-03 11:09:42 EST ---

(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.

--- Additional comment from Abhishek Gupta on 2015-02-27 17:51:32 EST ---

No code changes were made, there were some applications that had stuck operations that we cleared.

--- Additional comment from Sergio Santos on 2015-04-23 09:28:19 EDT ---

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

--- Additional comment from Andy Grimm on 2015-04-24 10:31:43 EDT ---

Sergio, I have fixed your domain.  You should be able to create a new jenkins app now.

--- Additional comment from Sergio Santos on 2015-04-24 14:07:34 EDT ---

Thanks Andy.
I've just tested and it is working fine now.

--- Additional comment from Gustavo E Bonilla on 2015-10-24 22:54:14 EDT ---

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.

--- Additional comment from Gustavo E Bonilla on 2015-10-24 22:55:39 EDT ---

(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!!!

--- Additional comment from Ben Parees on 2015-10-24 23:18:25 EDT ---

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 1 Rory Thrasher 2015-12-10 17:27:17 EST
Gustavo,

Andy Grimm fixed your domain.  Are you still being affected by this problem?
Comment 2 Rory Thrasher 2015-12-18 15:27:34 EST
Gustavo,

I'm going to go ahead and close this since your domain should be fixed.  If you're still having this issue, please reopen with more information.  Thank you.

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