Bug 971296 - Connection url for mysql cartridges in app is not correct
Summary: Connection url for mysql cartridges in app is not correct
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-06 08:39 UTC by chunchen
Modified: 2016-09-30 02:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-11 04:18:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description chunchen 2013-06-06 08:39:26 UTC
Description of problem:
When adding mysql cartridge to an app, the gear's ip address is displayed instead of the dns. For a scaled app, we can only connect to db cartridge with ip and port from the standalone db gear, on the haproxy gear, we have to connect via the gear dns and port.
So this problem can cause confusion and misunderstanding to end users.

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

How reproducible:
always

Steps to Reproduce:
1. Create an app
rhc app create cphp0s0 php-5.3 --no-git --scaling
2. Add mysql to this app
rhc cartridge add mysql-5.1 -a cphp0s0
Actual results:
Adding mysql-5.1 to application 'cphp0s0' ... Success
<-------------snip--------------->
RESULT:
Added mysql-5.1 to application cphp0s0
Embedded app details: Connection URL: mysql://127.1.24.130:3306
<-------------sinp--------------->

Expected results:
the connection url should use environment variable instead of ip address,like "mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/"

Additional info:

Comment 2 openshift-github-bot 2013-06-07 21:13:46 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/49b6176e830a8de6d1d72b7fc8d1e90aa3f69b88
Bug 971296: Display mysql environment variables rather than IPs during install

Comment 3 chunchen 2013-06-08 02:13:06 UTC
It's fixed, verified on devenv_3334, please refer to the following results:

[root test]# rhc cartridge add mysql-5.1 -a cphp0s0
Adding mysql-5.1 to application 'cphp0s0' ... Success

mysql-5.1 (MySQL Database 5.1)
------------------------------
  Gears:          1 small
  Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/
  Database Name:  cphp0s0
  Password:       3yIWdCjBEqGj
  Username:       adminct48ntZ

RESULT:
Added mysql-5.1 to application cphp0s0
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: adminct48ntZ
   Root Password: 3yIWdCjBEqGj
   Database Name: cphp0s0
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.


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