Bug 972261 - The connection url for mongodb cartridge does not get displayed behind the string "Embedded app details:" during installation
The connection url for mongodb cartridge does not get displayed behind the st...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Mace
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-07 23:13 EDT by chunchen
Modified: 2016-09-29 22:15 EDT (History)
3 users (show)

See Also:
Fixed In Version: devenv_3340+
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-24 10:52:36 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 chunchen 2013-06-07 23:13:27 EDT
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 09:18:43 EDT
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 02:09:57 EDT
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 02:55:59 EDT
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 08:43:29 EDT
(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-13 22:41:12 EDT
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.