Bug 971296 - Connection url for mysql cartridges in app is not correct
Connection url for mysql cartridges in app is not correct
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
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-06 04:39 EDT by chunchen
Modified: 2016-09-29 22:15 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-11 00:18:02 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-06 04:39:26 EDT
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 17:13:46 EDT
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-07 22:13:06 EDT
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.