Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 971296 - Connection url for mysql cartridges in app is not correct
Connection url for mysql cartridges in app is not correct
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Mace
libra bugs
: Regression
Depends On:
  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:
Last Closed: 2013-06-11 00:18:02 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 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):

How reproducible:

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
Added mysql-5.1 to application cphp0s0
Embedded app details: Connection URL: mysql://

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

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
  Database Name:  cphp0s0
  Password:       3yIWdCjBEqGj
  Username:       adminct48ntZ

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
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.