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:
https://github.com/openshift/origin-server/pull/2792
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
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.