Bug 997763 - Fail to add Jenkins-client via "--enable-jenkins" option with/without jenkins server
Fail to add Jenkins-client via "--enable-jenkins" option with/without jenkins...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-16 03:49 EDT by Zhe Wang
Modified: 2015-05-14 22:24 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-29 08:51:44 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 Zhe Wang 2013-08-16 03:49:09 EDT
Description of problem:
It fails to add a Jenkins-client cartridge with --enable-jenkins option when creating an app with or without a jenkins server. On the other hand, there is no problem to add a Jenkins client via RHC.

When adding client  without jenkins server with --enable-jenkins, it failed with "Issues:
    1. Jenkins failed to install - Invalid cartridge 'jenkins-1.4' specified."
    
When adding cllient  with jenkins server added with --enable-jenkins, it failed with "  1. Jenkins client failed to install - Invalid cartridge. Valid values  are (mock-plugin-0.1, cron-1.4, phpmyadmin-3, rockmongo-1.1,  switchyard-0, metrics-0.1, 10gen-mms-agent-0.1, mysql-5.1, haproxy-1.4,".

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

How reproducible:
always

Steps to Reproduce:
1. create an app with "--enable-jenkins" option, but without a Jenkins server app in the domain

2. create a Jenkins server

3. create another app with "--enable-jenkins" option

4. add a Jenkins-client cartridge to the app created in Step 3 via RHC.

Actual results:
In Step 1, adding a Jekins-client with enable-jenkins option failed with the error below:

<---------------------------------------------->
Creating application 'py27' ... done

Setting up a Jenkins application ... not complete

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

Cloning into 'py27'...

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING:  Your application was created successfully but had problems during
          configuration. Below is a list of the issues and steps you can
          take to complete the configuration of your application.
  Application URL: http://py27-dev3660tst.dev.rhcloud.com/

  Issues:
    1. Jenkins failed to install - Invalid cartridge 'jenkins-1.4' specified.
  Steps to complete your configuration:

    1. Installing jenkins and jenkins-client
      $ rhc create-app jenkins
      $ rhc add-cartridge jenkins-client -a py27

  If you continue to experience problems after completing these steps,
  you can try destroying and recreating the application:
    $ rhc app delete py27 --confirm

  Please contact us if you are unable to successfully create your 
  application:
    Support - https://www.openshift.com/support
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<---------------------------------------------------->

Moreover, Step 3 also failed, and the errors were:

<---------------------------------------------------->
Creating application 'phptst' ... done

Setting up Jenkins build ... not complete

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

Cloning into 'phptst'...

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING:  Your application was created successfully but had problems during
          configuration. Below is a list of the issues and steps you can
          take to complete the configuration of your application.
 
 Application URL: http://phptst-dev3660tst.dev.rhcloud.com/
  Issues:
     1. Jenkins client failed to install - Invalid cartridge. Valid values  are (mock-plugin-0.1, cron-1.4, phpmyadmin-3, rockmongo-1.1,  switchyard-0, metrics-0.1, 10gen-mms-agent-0.1, mysql-5.1, haproxy-1.4,
postgresql-9.2, postgresql-8.4, mongodb-2.2, jenkins-client-1)

  Steps to complete your configuration:
    1. Install the jenkins client
      $ rhc add-cartridge jenkins-client -a phptst

  If you continue to experience problems after completing these steps,
  you can try destroying and recreating the application:
    $ rhc app delete phptst --confirm

  Please contact us if you are unable to successfully create your 
  application:
    Support - https://www.openshift.com/support
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<---------------------------------------------------->

However, it succeeded to add a Jenkins-client via RHC in step 4.


Expected results:
It should be successful to add a Jenkins-client with "enable-jenkins" option when creating an app.

Additional info:
Comment 1 Clayton Coleman 2013-08-16 10:03:27 EDT
Old RHC clients have a reference to jenkins-client-1.4 and jenkins-1.4 because that's what they needed to do.  The rest client needs to change to use tags and to scan for something that looks like jenkins without the version.

This means that old clients are broken when the rename is delivered.
Comment 2 Clayton Coleman 2013-08-16 12:33:02 EDT
Fabiano, we should find the latest copy of jenkins server and client by:

find all carts with "ci_builder" (or ci for jenkins) and name starts with "jenkins", then sort by name. 

Should be a helper method in app.rb probably.
Comment 3 Fabiano Franz 2013-08-20 15:00:18 EDT
Fixed in https://github.com/openshift/rhc/pull/438
Comment 4 openshift-github-bot 2013-08-20 17:40:34 EDT
Commits pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/08b0593cfcd8b64188ce71bbac187012b32cd18b
Bug 997763 - find jenkins cartridges by tag and base name

https://github.com/openshift/rhc/commit/4a04c51b26794ed2fc9cd0d0ad685c3788ba238d
Bug 997763 - encapsulated fetch of jenkins cartridges names

https://github.com/openshift/rhc/commit/733e20d26cddbbcac2d83c2c4143ef612880ebb7
Bug 997763 - raise error if server does not provide a Jenkins cartridge
Comment 5 Zhe Wang 2013-08-21 06:39:09 EDT
Verified in devenv_3680:

[zhe@fedora run11]$ rhc app create rb9 ruby-1.9 --enable-jenkins
Application Options
-------------------
  Namespace:  dev3680tst
  Cartridges: ruby-1.9
  Gear Size:  default
  Scaling:    no

Creating application 'rb9' ... done


Setting up a Jenkins application ... done

  Jenkins created successfully.  Please make note of these credentials:
   User: admin
   Password: MDXefGkzR2xV
Note:  You can change your password at: https://jenkins-dev3680tst.dev.rhcloud.com/me/configure

Setting up Jenkins build ... done

  Associated with job 'rb9-build' in Jenkins server.

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

Your application 'rb9' is now available.

  URL:        http://rb9-dev3680tst.dev.rhcloud.com/
  SSH to:     5214973acc7c814446000022@rb9-dev3680tst.dev.rhcloud.com
  Git remote: ssh://5214973acc7c814446000022@rb9-dev3680tst.dev.rhcloud.com/~/git/rb9.git/

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