Bug 998960 - [origin_broker_86]Fail to add cartridge if cartridge-level variables already exist as user env variable
[origin_broker_86]Fail to add cartridge if cartridge-level variables already ...
Status: CLOSED NOTABUG
Product: OpenShift Online
Classification: Red Hat
Component: Master (Show other bugs)
2.x
All All
medium Severity medium
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-20 08:35 EDT by zhaozhanqi
Modified: 2015-05-14 20:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-20 15:19:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description zhaozhanqi 2013-08-20 08:35:12 EDT
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.com: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 14:41:34 EDT
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 15:19:56 EDT
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.