Bug 998960 - [origin_broker_86]Fail to add cartridge if cartridge-level variables already exist as user env variable
Summary: [origin_broker_86]Fail to add cartridge if cartridge-level variables already ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-20 12:35 UTC by zhaozhanqi
Modified: 2015-05-15 00:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-20 19:19:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhaozhanqi 2013-08-20 12:35:12 UTC
Description of problem:
add one env variable named cartridge-level variables like 'OPENSHIFT_POSTGRESQL_DB_PORT'. And then add postgresql cartridge, it will be failed and show 'Could not start Postgres'

Version-Release number of selected component (if applicable):
devenv_3677

How reproducible:
always

Steps to Reproduce:
1. create one app 
2. add one env variable named 'OPENSHIFT_POSTGRESQL_DB_PORT'
   curl -k -H 'Accept: application/xml' --user zzhao:redhat https://ec2-107-22-22-100.compute-1.amazonaws.com/broker/rest/applications/817232a8097a11e3b0fa22000ab30f72/environment-variables -X POST -d name=OPENSHIFT_POSTGRESQL_DB_PORT  -d value=333
3. add postgresql cartridge for this app
 rhc cartridge add -a app -c postgresql-8.4

Actual results:
step:3
rhc cartridge add -a zqphps -c postgresql-8.4
Adding postgresql-8.4 to application 'zqphps' ... Could not start Postgres


Expected results:
should be added successfully and OPENSHIFT_POSTGRESQL_DB_PORT will be covered with new value

Additional info:

Comment 1 Ravi Sankar 2013-08-20 18:41:34 UTC
Any env variables that will be written under .env dir during cartridge configure/post-configure/some other operation should delete those variables from .env/user_vars dir.

Comment 2 Jhon Honce 2013-08-20 19:19:56 UTC
Overriding this variables is a feature of user variables.  

Using correct values is up to the user.


Note You need to log in before you can comment on or make changes to this bug.