Bug 999868

Summary: It should prompt message "Server does not support environment variables" when add cartridge to app & create app with env options (-e key=value) for ose-1.2.1/ose-1.2.2 (not support user environment variable)
Product: OpenShift Online Reporter: weiwei jiang <wjiang>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 2.xCC: wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 16:47:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description weiwei jiang 2013-08-22 09:44:49 UTC
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:

Comment 1 Wei Sun 2013-09-10 07:50:20 UTC
Tested on OSE 1.2.2 with rhc 1.14.4 ,still can reproduce this bug.

Comment 2 Fabiano Franz 2013-09-11 16:56:34 UTC
Pull request: https://github.com/openshift/rhc/pull/462

Comment 4 weiwei jiang 2013-09-12 09:15:13 UTC
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.