Hide Forgot
Description of problem: when run `rhc cartridge add -e` and `rhc app create -e` with env options(-e key=value), it will success and app is created & cartridge is added, but client will return "Environment Variables: key=value" .Howerver,environment variables are not set successfully because Server does not support this feature.So the client output is confused. Should prompt messages like "Server does not support environment variables" for server not support user environment variable like ose-1.2.1. Version-Release number of selected component (if applicable): ose-1.2.1 rhc-1.13.5 How reproducible: always Steps to Reproduce: 1. Create an app with env options 2. Add cartridge with env options 3. Check the output messages. 4.Check environment variables Actual results: 1.rhc app create app1 perl-5.1 -e key=value Using perl-5.10 (Perl 5.10) for 'perl-5.1' Application Options ------------------- Namespace: wjiang Cartridges: perl-5.10 Gear Size: default Scaling: no Environment Variables: key=value Creating application 'app1' ... done 2.rhc cartridge add postgresql-8.4 -a php -e adf=adf Adding postgresql-8.4 to application 'php' ... done postgresql-8.4 (PostgreSQL Database 8.4) ---------------------------------------- Gears: Located with php-5.3, mysql-5.1 Connection URL: postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT Database Name: php Password: L9rGeYX9VpXf Username: admindpa57lt Environment Variables: adf=adf Use 'rhc env --help' to manage environment variable(s) on this cartridge and application. PostgreSQL 8.4 database added. Please make note of these credentials: Root User: admindpa57lt Root Password: L9rGeYX9VpXf Database Name: php Connection URL: postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT 4. the variable is not added Expected results: it should prompt messages like "Server does not support environment variables". Additional info:
Tested on OSE 1.2.2 with rhc 1.14.4 ,still can reproduce this bug.
Pull request: https://github.com/openshift/rhc/pull/462
Commits pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/dbdd942299cae9f375f3d9491acead5ae25a42fe Bug 999868 - warns when create-app and add-cartridge and server does not support env vars https://github.com/openshift/rhc/commit/1e251a44e1be8bd011e855a7e058f3930bf0e5de Bug 999868 - cleanup https://github.com/openshift/rhc/commit/713fec1a9004cbe22534f5d8bf053485840efbdc Bug 999868 - encapsulated check for env vars support https://github.com/openshift/rhc/commit/ef16aa080a1455306fc9aa8c6474f2d58386ad7b Bug 999868 - improved order for messages
Test on ose-1.2.2 using rhc-1.14.6-build_from_devenv_3776, the prompt message "Server does not support environment variables." displayed. Test on ose-1.2.1 using rhc-1.14.6-build_from_devenv_3776, the prompt message "Server does not support environment variables." displayed. So, verified this issue. Thx.