Bug 963985 - rhc client fails to display admin credentials if there is a problem cloning jenkins repository
rhc client fails to display admin credentials if there is a problem cloning j...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
All Linux
high Severity low
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-16 20:09 EDT by Brian Harrington
Modified: 2015-05-14 22:22 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-24 10:49:01 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 Brian Harrington 2013-05-16 20:09:45 EDT
Description of problem:

When creating a jenkins application the admin credentials are never displayed if there is a problem performing the git clone.  This happens both when there are DNS propagation issue as well as when the directory already exists on the filesystem.

Version-Release number of selected component (if applicable):
[bharring@coralcable ~]$ rpm -qi rhc
Name        : rhc                          Relocations: (not relocatable)
Version     : 1.8.0                             Vendor: Red Hat, Inc.
Release     : 1.git.12.7197c32.el6op        Build Date: Wed 24 Apr 2013 08:31:33 AM PDT
Install Date: Tue 14 May 2013 10:59:09 AM PDT      Build Host: x86-022.build.eng.bos.redhat.com
Group       : Network/Daemons               Source RPM: rhc-1.8.0-1.git.12.7197c32.el6op.src.rpm
Size        : 3618645                          License: ASL 2.0
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://openshift.redhat.com
Summary     : OpenShift client management tools
Description :
Provides OpenShift client libraries.


How reproducible:
100%

Steps to Reproduce:
1. mkdir jenkins
2. rhc app create jenkins jenkins-1.4
  
Actual results:
[bharring@coralcable ~]$ bhrhc app create jenkins jenkins-1.4
Application Options
-------------------
  Namespace:  bharring
  Cartridges: jenkins-1.4
  Gear Size:  default
  Scaling:    no

Creating application 'jenkins' ... done

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

Downloading the application Git repository ...
Initialized empty Git repository in /home/bharring/jenkins/.git/
The authenticity of host 'jenkins-bharring.ose.example.com (10.205.49.126)' can't be established.
RSA key fingerprint is a2:61:41:c4:3a:07:2c:56:7c:92:a0:14:e9:7f:a7:d1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'jenkins-bharring.ose.example.com' (RSA) to the list of known hosts.
Connection closed by 10.205.49.126
fatal: The remote end hung up unexpectedly

Unable to clone your repository. Called Git with: git clone ssh://51957028963569971a00001c@jenkins-bharring.ose.example.com/~/git/jenkins.git/ "jenkins"

jenkins @ http://jenkins-bharring.ose.example.com/ (uuid: 51957028963569971a00001c)
---------------------------------------------------------------------------------------------
  Created: 4:47 PM
  Gears:   1 (defaults to small)
  Git URL: ssh://51957028963569971a00001c@jenkins-bharring.ose.example.com/~/git/jenkins.git/
  SSH:     51957028963569971a00001c@jenkins-bharring.ose.example.com

  jenkins-1.4 (Jenkins Server 1.4)
  --------------------------------
    Gears:    1 small
    Password: E5XfBuk_Muej
    Username: system_builder

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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://jenkins-bharring.ose.example.com/

  Issues:
    1. We were unable to clone your application's git repo - Unable to clone your repository. Called Git with: git clone ssh://51957028963569971a00001c@jenkins-bharring.ose.example.com/~/git/jenkins.git/ "jenkins"

  Steps to complete your configuration:
    1. Clone your git repo
      $ rhc git-clone jenkins

  If you can't get your application 'jenkins' running in the browser,
  you can try destroying and recreating the application:

    $ rhc app delete jenkins --confirm

  If this doesn't work for you, let us know in the forums or in IRC and we'll
  make sure to get you up and running.

    Forums - https://www.openshift.com/forums/openshift
    IRC - #openshift (on Freenode)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


[bharring@coralcable ~]$ bhrhc git-clone jenkins 
Initialized empty Git repository in /home/bharring/jenkins/.git/
Your application code is now in 'jenkins'
[bharring@coralcable ~]$ bhrhc app delete jenkins
This is a non-reversible action! Your application code and data will be permanently deleted if you continue!

Are you sure you want to delete the application 'jenkins'? (yes|no): yes

Deleting application 'jenkins' ... deleted
[bharring@coralcable ~]$ 
[bharring@coralcable ~]$ 
[bharring@coralcable ~]$ 
[bharring@coralcable ~]$ 
[bharring@coralcable ~]$ 
[bharring@coralcable ~]$ bhrhc app create jenkins jenkins-1.4
Application Options
-------------------
  Namespace:  bharring
  Cartridges: jenkins-1.4
  Gear Size:  default
  Scaling:    no

Creating application 'jenkins' ... done

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

Downloading the application Git repository ...
fatal: destination path 'jenkins' already exists and is not an empty directory.

The directory you are cloning into already exists.

jenkins @ http://jenkins-bharring.ose.example.com/ (uuid: 519571be963569971a00006f)
---------------------------------------------------------------------------------------------
  Created: 4:54 PM
  Gears:   1 (defaults to small)
  Git URL: ssh://519571be963569971a00006f@jenkins-bharring.ose.example.com/~/git/jenkins.git/
  SSH:     519571be963569971a00006f@jenkins-bharring.ose.example.com

  jenkins-1.4 (Jenkins Server 1.4)
  --------------------------------
    Gears:    1 small
    Password: uMyWpLrixFZM
    Username: system_builder

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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://jenkins-bharring.ose.example.com/

  Issues:
    1. We were unable to clone your application's git repo - The directory you are cloning into already exists.

  Steps to complete your configuration:
    1. Clone your git repo
      $ rhc git-clone jenkins

  If you can't get your application 'jenkins' running in the browser,
  you can try destroying and recreating the application:

    $ rhc app delete jenkins --confirm

  If this doesn't work for you, let us know in the forums or in IRC and we'll
  make sure to get you up and running.

    Forums - https://www.openshift.com/forums/openshift
    IRC - #openshift (on Freenode)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

[bharring@coralcable ~]$ 

Expected results:

[bharring@coralcable ~]$ bhrhc app create jenkins jenkins-1.4
Application Options
-------------------
  Namespace:  bharring
  Cartridges: jenkins-1.4
  Gear Size:  default
  Scaling:    no

Creating application 'jenkins' ... done

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

Downloading the application Git repository ...
Initialized empty Git repository in /home/bharring/jenkins/.git/

Your application code is now in 'jenkins'

jenkins @ http://jenkins-bharring.ose.example.com/ (uuid: 5195720d963569971a0000b5)
---------------------------------------------------------------------------------------------
  Created: 4:55 PM
  Gears:   1 (defaults to small)
  Git URL: ssh://5195720d963569971a0000b5@jenkins-bharring.ose.example.com/~/git/jenkins.git/
  SSH:     5195720d963569971a0000b5@jenkins-bharring.ose.example.com

  jenkins-1.4 (Jenkins Server 1.4)
  --------------------------------
    Gears:    1 small
    Password: otherpassword
    Username: system_builder

RESULT:
Application jenkins was created.

Jenkins created successfully.  Please make note of these credentials:

   User: admin
   Password: password

Note:  You can change your password at: https://jenkins-bharring.ose.example.com/me/configure
Comment 1 Clayton Coleman 2013-06-12 21:41:09 EDT
Fixed in https://github.com/openshift/rhc/pull/400 - also overhauled the output of the command to make it more relevant.  Example output follows:

$ bundle exec bin/rhc create-app foo2 php-5
Using php-5.3 (PHP 5.3) for 'php-5'

Application Options
-------------------
  Namespace:  aoeu
  Cartridges: php-5.3
  Gear Size:  default
  Scaling:    no

Creating application 'foo2' ... http://foo2-aoeu.dev.rhcloud.com/

  Application foo2 was created.
  The cartridge php deployed a template application
  Starting Apache+mod_php HTTPD server

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

Cloning into 'foo2'...

Your application 'foo2' is now available.

  URL:        http://foo2-aoeu.dev.rhcloud.com/
  SSH to:     365943475092213085503488@foo2-aoeu.dev.rhcloud.com
  Git remote: ssh://365943475092213085503488@foo2-aoeu.dev.rhcloud.com/~/git/foo2.git/
  Cloned to:  /home/clayton/code/rhc/foo2

Run 'rhc show-app foo2' for more details about your app.
Comment 2 Wei Sun 2013-06-13 06:06:10 EDT
Will verify it after the pull request is merged.
Comment 3 openshift-github-bot 2013-06-14 11:41:24 EDT
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/a5fb68b1fcb60572faf2cbbd79ffd86606d7781e
Bug 963985 - Overhaul how RHC app-create generates output

Instead of displaying all messages at the end, indent them and put them near the step that generates them.
If errors occur, display a simpler warning.
Skip displaying the entire app-show output, instead show more relevant user info
Simplify the other output in the command
Comment 4 Wei Sun 2013-06-17 00:04:03 EDT
Verified on devenv_3368,and rhc is build from devenv_3368
Step:
1.mkdir jenkins
2.rhc app create jenkins jenkins-1.4

Result:
[sunwei@dhcp-8-229 dev]$ rhc app create jenkins jenkins-1.4
Password: *


Application Options
-------------------
  Namespace:  wsundev3368
  Cartridges: jenkins-1.4
  Gear Size:  default
  Scaling:    no

Creating application 'jenkins' ... done

  Application jenkins was created.
  The cartridge jenkins deployed a template application
  Jenkins created successfully.  Please make note of these credentials:
   User: admin
   Password: u-n1Til1nM7h
Note:  You can change your password at: https://jenkins-wsundev3368.dev.rhcloud.com/me/configure

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

Cloning into 'jenkins'...
The authenticity of host 'jenkins-wsundev3368.dev.rhcloud.com (54.242.65.128)' can't be established.
RSA key fingerprint is 28:b5:1a:f1:78:ab:29:38:42:b7:54:14:fd:db:e9:af.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'jenkins-wsundev3368.dev.rhcloud.com,54.242.65.128' (RSA) to the list of known hosts.

Your application 'jenkins' is now available.

  URL:        http://jenkins-wsundev3368.dev.rhcloud.com/
  SSH to:     dd6fe97ad70111e291e712313d04ead9@jenkins-wsundev3368.dev.rhcloud.com
  Git remote: ssh://dd6fe97ad70111e291e712313d04ead9@jenkins-wsundev3368.dev.rhcloud.com/~/git/jenkins.git/
  Cloned to:  /home/sunwei/test/dev/jenkins

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

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