Bug 972261 - The connection url for mongodb cartridge does not get displayed behind the string "Embedded app details:" during installation
Summary: The connection url for mongodb cartridge does not get displayed behind the st...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-08 03:13 UTC by chunchen
Modified: 2016-09-30 02:15 UTC (History)
3 users (show)

Fixed In Version: devenv_3340+
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-24 14:52:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 974479 0 medium CLOSED Missing cartridge info after embed switchyard to a jboss app 2021-02-22 00:41:40 UTC

Internal Links: 974479

Description chunchen 2013-06-08 03:13:27 UTC
Description of problem:
When installing the mongodb cartridge into an app, the connection url does not get displayed.

Version-Release number of selected component (if applicable):
devenv_3335
rhc-1.10.1

How reproducible:
always

Steps to Reproduce:
1. Create an app
rhc app create cpl00 perl-5.10 --no-git
2. Add mongodb to this app
rhc cartridge add mongodb-2.2 -a cpl00

Actual results:
<---------snip---------->
RESULT:
Added mongodb-2.2 to application cpl00
Embedded app details:  #here lost connection url#  
<---------snip---------->

Expected results:
should display connection url like "Embedded app details: Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT"

Additional info:
For mysql and postgresql, they are all ok, please refer to the following messages:

RESULT:
Added mysql-5.1 to application cpl00
Embedded app details: Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT

RESULT:
Added postgresql-8.4 to application cpl00
Embedded app details: Connection URL: postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT

Comment 1 Dan Mace 2013-06-10 13:18:43 UTC
Already fixed in devenv_3340+:

$ rhc cartridge add mongodb-2.2 -a cpl00 -pp
Adding mongodb-2.2 to application 'cpl00' ... Success

mongodb-2.2 (MongoDB NoSQL Database 2.2)
----------------------------------------
  Gears:          Located with perl-5.10
  Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
  Database Name:  cpl00
  Password:       _jewjP8Bdsvl
  Username:       admin

RESULT:
Added mongodb-2.2 to application cpl00
Embedded app details: 
MongoDB 2.2 database added.  Please make note of these credentials:
   Root User:     admin
   Root Password: _jewjP8Bdsvl
   Database Name: cpl00
Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/

Comment 2 chunchen 2013-06-13 06:09:57 UTC
It's reproduced on devenv_3354, there are still not Mongo IPs and Port variables behind the string "Embedded app details:". please refer to the following results:


$ rhc cartridge add mongodb-2.2 -a cpl00 -pp
Adding mongodb-2.2 to application 'cpl00' ... Success

mongodb-2.2 (MongoDB NoSQL Database 2.2)
----------------------------------------
  Gears:          Located with perl-5.10
  Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
  Database Name:  cpl00
  Password:       48DWBT-fdzn-
  Username:       admin

RESULT:
Added mongodb-2.2 to application cpl00
Embedded app details: 
MongoDB 2.2 database added.  Please make note of these credentials:
   Root User:     admin
   Root Password: 48DWBT-fdzn-
   Database Name: cpl00
Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/

Comment 3 chunchen 2013-06-13 06:55:59 UTC
FYI, the mysql and postgresql installation messages are as below:

$ rhc cartridge add mysql-5.1 -a cpl00
Adding mysql-5.1 to application 'cpl00' ... Success

mysql-5.1 (MySQL Database 5.1)
------------------------------
  Gears:          Located with perl-5.10, mongodb-2.2
  Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/
  Database Name:  cpl00
  Password:       3DqAGfig4IWW
  Username:       adminNjCm6kG

RESULT:
Added mysql-5.1 to application cpl00
Embedded app details: Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT   <<<<<<<<<<

MySQL 5.1 database added.  Please make note of these credentials:
       Root User: adminNjCm6kG
   Root Password: 3DqAGfig4IWW
   Database Name: cpl00
Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/
You can manage your new MySQL database by also embedding phpmyadmin-3.4.
The phpmyadmin username and password will be the same as the MySQL credentials above.

$ rhc cartridge add postgresql -a cpl00
Using postgresql-8.4 (PostgreSQL Database 8.4) for 'postgresql'
Adding postgresql-8.4 to application 'cpl00' ... Success

postgresql-8.4 (PostgreSQL Database 8.4)
----------------------------------------
  Gears:          Located with perl-5.10, mongodb-2.2, mysql-5.1
  Connection URL: postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT
  Database Name:  cpl00
  Password:       K_kPLeSNYlja
  Username:       adminpl8jawi

RESULT:
Added postgresql-8.4 to application cpl00
Embedded app details: Connection URL: postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT <<<<<<<

PostgreSQL 8.4 database added.  Please make note of these credentials:
   Root User: adminpl8jawi
   Root Password: K_kPLeSNYlja
   Database Name: cpl00
Connection URL: postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT

Comment 4 Dan Mace 2013-06-13 12:43:29 UTC
(In reply to chunchen from comment #3)

This is as designed; we don't want to expose the actual IP and ports from any of the APIs or client interfaces, as they are not portable and not recommended for use directly. Applications should always rely on the environment variables for IP and port addressing.

To be clear: the original bug was that the MongoDB IP and port was shown. The fix was to show the environment variable names instead.

If there are any remaining instances of actual IP and ports being shown to the client, please re-open the bug.

Thanks, and sorry for the confusion!

Comment 5 chunchen 2013-06-14 02:41:12 UTC
According to  Comment 4 and verified again on devenv_3358, the bug is fixed.


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