Bug 847723 - Cartridges' urls are not displayed in rhc domain show
Cartridges' urls are not displayed in rhc domain show
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
libra bugs
: Reopened, Triaged
: 848611 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-08-13 07:08 EDT by Jianwei Hou
Modified: 2015-05-14 22:02 EDT (History)
6 users (show)

See Also:
Fixed In Version: rhc-0.97.13-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-17 17:29:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jianwei Hou 2012-08-13 07:08:27 EDT
Description of problem:
Run rhc domain show, the added cartridge's url is not displayed.

Version-Release number of selected component (if applicable):
on devenv_1975
CLI: rhc-0.97.5

How reproducible:

Steps to Reproduce:
1.Create an application and embed mysql, phpmyadmin, mongodb, rockmongo
2.Run rhc domain show
Actual results:
The phpmyadmin and rockmongo's url is not displayed in rhc domain show

    Framework: php-5.3
     Creation: 2012-08-13T07:04:02-04:00
         UUID: 4f1e4593632846fca21ffd9ed5be5d90
      Git URL: ssh://4f1e4593632846fca21ffd9ed5be5d90@app1-1975t10.dev.rhcloud.com/~/git/app1.git/
   Public URL: http://app1-1975t10.dev.rhcloud.com/

Expected results:
The embedded cartridges' urls should be displayed to the usrs.

Additional info:
Comment 1 John (J5) Palmieri 2012-08-14 17:47:34 EDT
Added the connection_url if there is one
Comment 2 joycezhang 2012-08-15 04:15:08 EDT
This bug will be verified with the build with fix is available.
Comment 3 joycezhang 2012-08-15 22:32:06 EDT
This bug has been verified and fixed. Please refer to the details as below:

Verified build:

1. Create an app
2. Add cartridges to this app
3. Run rhc domain show to check the added cartridges 

Actual results:
The added cartridges are listed with URL as below:

#rhc domain show
Password: *

User Info
Namespace: jinzhang1

Login: jinzhang+5@redhat.com

Namespace jinzhang1's Applications
    Framework: jbossas-7
     Creation: 2012-08-15T22:08:45-04:00
         UUID: bc95dc549ce24b29a2c9299695515108
      Git URL: ssh://bc95dc549ce24b29a2c9299695515108@myscapp1-jinzhang1.dev.rhcloud.com/~/git/myscapp1.git/
   Public URL: http://myscapp1-jinzhang1.dev.rhcloud.com/
       mongodb-2.0 - mongodb://ca4e5a4c83-jinzhang1.dev.rhcloud.com:35621/
       mysql-5.1 - mysql://9b02c3c955-jinzhang1.dev.rhcloud.com:35606/

So it can be closed. Thanks.
Comment 4 Jianwei Hou 2012-08-16 03:21:14 EDT
Tested with rhc-0.97.7, still got an error for rhc domain show, so change it to assigned.

1.Create an application and embed mysql, phpmyadmin, mongodb, rockmongo
2.Run rhc domain show


User Info
Namespace: 1997t1

Login: jhou@redhat.com

Namespace 1997t1's Applications
    Framework: php-5.3
     Creation: 2012-08-16T03:11:05-04:00
         UUID: 333384c8b7ee4c5d807b48c4d36e0c3e
      Git URL: ssh://333384c8b7ee4c5d807b48c4d36e0c3e@php1-1997t1.dev.rhcloud.com/~/git/php1.git/
   Public URL: http://php1-1997t1.dev.rhcloud.com/
       rockmongo-1.1 - https://php1-1997t1.dev.rhcloud.com/rockmongo/
error: undefined method `[]' for nil:NilClass Use --trace to view backtrace.
Comment 5 Clayton Coleman 2012-08-16 10:56:57 EDT
There's another defect which is a dupe of this.
Comment 6 John (J5) Palmieri 2012-08-16 13:40:49 EDT

*** This bug has been marked as a duplicate of bug 848611 ***
Comment 7 John (J5) Palmieri 2012-08-16 13:50:14 EDT
Woops. Should close dup on other bug
Comment 8 John (J5) Palmieri 2012-08-16 13:50:52 EDT
*** Bug 848611 has been marked as a duplicate of this bug. ***
Comment 9 John (J5) Palmieri 2012-08-16 13:53:01 EDT
Fixed.  Please run the command with --trace next time and post the backtrace in the bug.
Comment 10 Jianwei Hou 2012-08-16 22:10:35 EDT
Still have the same problem with rhc-0.97.11(ruby-1.8)

hjw@my scripts$ rhc domain show -px -d --trace
D, [2012-08-17T10:09:01.189931 #22573] DEBUG -- : Connecting to https://ec2-107-22-15-132.compute-1.amazonaws.com/broker/rest/api
D, [2012-08-17T10:09:03.875625 #22573] DEBUG -- : Getting all domains

User Info
Namespace: jhou

Login: jhou@redhat.com

Namespace jhou's Applications
    Framework: jenkins-1.4
     Creation: 2012-08-16T21:44:26-04:00
         UUID: e1de20ea7e524b589fdda47445e429b0
      Git URL: ssh://e1de20ea7e524b589fdda47445e429b0@jenkins1-jhou.dev.rhcloud.com/~/git/jenkins1.git/
   Public URL: http://jenkins1-jhou.dev.rhcloud.com/

    Framework: php-5.3
     Creation: 2012-08-16T21:45:43-04:00
         UUID: 7c06ee45a760499ab08908e8683e9e75
      Git URL: ssh://7c06ee45a760499ab08908e8683e9e75@php1-jhou.dev.rhcloud.com/~/git/php1.git/
   Public URL: http://php1-jhou.dev.rhcloud.com/
       mysql-5.1 - mysql://
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/user_interaction.rb:237:in `method_missing': undefined method `[]' for nil:NilClass (NoMethodError)
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:89:in `show'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:87:in `each'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:87:in `show'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/helpers.rb:182:in `call'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/helpers.rb:182:in `section'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/helpers.rb:199:in `paragraph'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:77:in `show'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:75:in `each'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:75:in `show'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/helpers.rb:182:in `call'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/helpers.rb:182:in `section'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/helpers.rb:199:in `paragraph'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:67:in `show'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:66:in `each'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands/domain.rb:66:in `show'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands.rb:164:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands.rb:164:in `to_commander'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/commands.rb:73:in `run!'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/delegates.rb:7:in `run!'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/lib/rhc/cli.rb:37:in `start'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.97.11/bin/rhc:62
	from /usr/bin/rhc:19:in `load'
	from /usr/bin/rhc:19
Comment 11 John (J5) Palmieri 2012-08-17 12:08:10 EDT
Ok, turns out not all carts have properties yet.  I cleaned up the code so all of the intermediate Nil checking logic is in the property method of the cartridge model.  This should fix this bug and make sure it doesn't show up in other code later.
Comment 12 Jianwei Hou 2012-08-19 22:41:29 EDT
Tested with rhc-0.97.12

The problem is gone.
But some cartridges' urls are still not displayed in rhc domain show, these cartridges are phpmyadmin-3.4, metrics-0.1, jenkins-client, 10gen-mms-agent-0.1, phpmoadmin-1.0

The out put is like this:

    Framework: php-5.3
     Creation: 2012-08-19T21:56:56-04:00
         UUID: 2d6819b17cbc460898fbabb129d41c86
      Git URL: ssh://2d6819b17cbc460898fbabb129d41c86@php1-jhou.dev.rhcloud.com/~/git/php1.git/
   Public URL: http://php1-jhou.dev.rhcloud.com/
       mysql-5.1 - mysql://
Comment 13 John (J5) Palmieri 2012-08-20 12:40:28 EDT
Getting setup to push another fix.  The only thing I fixed was to check for a job_url property which jenkins-client sends instead of the connection_url

phpmoadmin-1.0 seems to print the url fine with the latest ami.

phpmyadmin-3.4 and metrics-0.1 don't export any property data so there is no way for me to display the URL

10gen-mms-agent-0.1 I couldn't test because I don't have a 10gen account but I suspect it is the same issue

A new bug needs to be filed for those cartridges to make sure they send a cart_data, connection_url property
Comment 14 Jianwei Hou 2012-08-21 02:40:52 EDT
Tested with rhc-0.97.13 and https://github.com/openshift/rhc/commit/073c5b60e22af80701dedb0c7769edf49be88d5b

seems the fix is not merged in to rhc-0.97.13

Modified /usr/lib/ruby/gems/1.8/gems/rhc-0.97.13/lib/rhc/commands/domain.rb according to above fix, and jenkins-client job url is succesfully shown.

This bug will be moved to verifed after fix is merged into latest CLI and test pass.
Comment 15 Jianwei Hou 2012-08-21 22:09:02 EDT
Verified on devenv_2047

jenkins-client job_url is added in rhc domain show

hjw@my apps$ rhc domain show 
Password: **

User Info
Namespace: 2047t1

Login: jhou@redhat.com

Namespace 2047t1's Applications
    Framework: zend-5.6
     Creation: 2012-08-21T21:56:43-04:00
         UUID: f9ff028f389c40f195db69d3ee8a1ac7
      Git URL: ssh://f9ff028f389c40f195db69d3ee8a1ac7@zendapp-2047t1.dev.rhcloud.com/~/git/zendapp.git/
   Public URL: http://zendapp-2047t1.dev.rhcloud.com/
       mysql-5.1 - mysql://
       jenkins-client-1.4 - https://jks-2047t1.dev.rhcloud.com/job/zendapp-build/

This bug will be closed, and bug 850544 will resolve cartridges' url_connection issue.

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