Bug 878407 - Jenkins server isn't created using option --enable-jenkins without jenkins server name speicified if commander version is 4.0.3
Summary: Jenkins server isn't created using option --enable-jenkins without jenkins se...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 885587
TreeView+ depends on / blocked
 
Reported: 2012-11-20 11:16 UTC by jizhao
Modified: 2015-05-15 02:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 885587 (view as bug list)
Environment:
Last Closed: 2012-12-19 19:27:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description jizhao 2012-11-20 11:16:36 UTC
Description of problem:
Create an app using option --enable-jenkins, but don't specify the jenkins server name. The jenkins server app can't be created.
But the jenkins server could be created successfully if specifying name like:
rhc app create app1 python-2.6 --enable-jenkins jenkins1


Version-Release number of selected component (if applicable):
stage(devenv-stage_257)
rhc-1.1.10


How reproducible:
Always


Steps to Reproduce:
1.Create an app using --enable-jenkins, but don't specify the jenkins server name.
# rhc app create app1 python-2.6 --enable-jenkins -d -p redhat
2.
3.

  
Actual results:
Only the python app is created, jenkins server is not created, and jenkins client is not added.

# rhc domain show
Applications in jizhao41
========================
  app1 @ http://app1-jizhao41.dev.rhcloud.com/
  ============================================
    Application Info
    ================
      UUID      = 5fc7e0d1d9c84ef694dd574631f568d4
      Git URL   = ssh://5fc7e0d1d9c84ef694dd574631f568d4.rhcloud.com/~/git/app1.git/
      SSH URL   = ssh://5fc7e0d1d9c84ef694dd574631f568d4.rhcloud.com
      Created   = 6:01 AM
      Gear Size = small
    Cartridges
    ==========
      python-2.6


Expected results:
The jenkins server app should be created and jenkins-client should be embedded to the app.


Additional info:

Comment 1 Fabiano Franz 2012-11-20 17:53:08 UTC
Which version are you using (rhc --version)? 

It indeed happens in the one currently in prod but was fixed already (I just confirmed it by testing on 1.0.4 and 1.2.1 with the same command line provided).

Comment 2 Xiaoli Tian 2012-11-21 01:08:05 UTC
Guess he was using an old rhc version.

Confirmed with rhc (1.1.10) in stage , it works:

#rhc app create phpapp1 php-5.3 --enable-jenkins -l xtian+int1 
Creating application 'phpapp1'
==============================

  Namespace: domxstg1
  Cartridge: php-5.3
  Gear Size: default
  Scaling:   no

Jenkins domain name is being propagated worldwide (this might take a minute)...
Your application's domain name is being propagated worldwide (this might take a minute)...
Cloning into 'phpapp1'...
done

phpapp1 @ http://phpapp1-domxstg1.stg.rhcloud.com/
==================================================
  Application Info
  ================
    Created   = 8:02 PM
    UUID      = bf4aea8db90b49d59170b7fd9766636a
    Gear Size = small
    Git URL   = ssh://bf4aea8db90b49d59170b7fd9766636a.rhcloud.com/~/git/phpapp1.git/
    SSH URL   = ssh://bf4aea8db90b49d59170b7fd9766636a.rhcloud.com
  Cartridges
  ==========
    php-5.3
    jenkins-client-1.4 = https://jenkins-domxstg1.stg.rhcloud.com/job/phpapp1-build/

RESULT:
Application phpapp1 was created.
Application jenkins was created.

Jenkins created successfully.  Please make note of these credentials:

   User: admin
   Password: SWLVIs3B1NMx

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

Comment 3 jizhao 2012-11-21 07:16:46 UTC
The version of gem package "commander" provided in our yum repo is 4.0.3, which causes the problem. After upgrading commander version to latest 4.1.2, --enable-jenkins option works fine.

Steps to reproduce:
1.Check commander version. Only install 4.0.3.
# gem uninstall -ax commander
# gem install -v 4.0.3 commander
2.Install the latest rhc client of stage branch via yum. For now, it's 1.1.10.
# yum install rhc
3.Create an app using --enable-jenkins, but don't specify the jenkins server name.
# rhc app create app1 python-2.6 --enable-jenkins -d -p redhat
4.Install commander 4.1.2.
# gem install -v 4.1.2 commander
5.Try step3 again.

Actual Results:
3.The jenkins server app won't be created
5.The jenkins server app will be created

Additional info:
If the user installs rhc client via gem, the latest commander 4.1.2 will be installed. In this case, this bug won't occur.

Comment 4 Clayton Coleman 2012-11-21 14:58:20 UTC
We have to support 4.0.3 commander unfortunately.

Comment 5 Fabiano Franz 2012-11-22 18:06:46 UTC
Good catch about Commander 4.0.3!

Pull request with the fix is placed:

https://github.com/openshift/rhc/pull/233

Comment 6 joycezhang 2012-11-23 03:05:36 UTC
This bug has been verified and fixed on devenv_2511.

Build:
devenv_2511
client built from devenv_2511

Steps:
1. Insall commander 4.0.3.
# gem uninstall -ax commander
# gem install -v 4.0.3 commander
2. Install rhc client
3. Create app with --enable-jenkins parameter added
rhc app create app1 python-2.6 --enable-jenkins -d -p redhat


Acutal results:
The app is created successfully with jenkins client added as below:
#rhc app create app1 python-2.6 --enable-jenkins -d -p redhat
app1 @ http://app1-testdoma2.dev.rhcloud.com/
=============================================
  Application Info
  ================
    Created   = Nov 22  9:58 PM
    UUID      = 4edb35f2430645328c29d441a0b5b45b
    Gear Size = small
    Git URL   = ssh://4edb35f2430645328c29d441a0b5b45b.rhcloud.com/~/git/app1.git/
    SSH URL   = ssh://4edb35f2430645328c29d441a0b5b45b.rhcloud.com
  Cartridges
  ==========
    python-2.6
    jenkins-client-1.4 = https://jenkins-testdoma2.dev.rhcloud.com/job/app1-build/

RESULT:
Application app1 was created.
Application jenkins was created.

Jenkins created successfully.  Please make note of these credentials:

   User: admin
   Password: DPfcbsZYYeXV

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


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