Bug 996353 - [fork][origin_broker_86]It shows incorrect error message while deleting some special env variables or in .env
Summary: [fork][origin_broker_86]It shows incorrect error message while deleting some ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-13 03:17 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 23:10:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhaozhanqi 2013-08-13 03:17:09 UTC
Description of problem:
when deleting some special env variables like 'OPENSHIFT_PRIMARY_CARTRIDGE_DIR'  or in .env, it will show 'Application *** has deleted environment variables', but in fact, the env variable will not been deleted.

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

How reproducible:
always

Steps to Reproduce:
1. create one app
2. delete one special env variable for example (OPENSHIFT_PRIMARY_CARTRIDGE_DIR) by restapi
curl -k -s -H 'content-type: application/json' --user $user:pass https://instance/broker/rest/domains/$domains/applications/zqphp/events -d '{"event":"unset-environment-variables","environment_variables":["OPENSHIFT_PRIMARY_CARTRIDGE_DIR"]}' 
3. check the env variable 'OPENSHIFT_PRIMARY_CARTRIDGE_DIR'
   rhc ssh $app --gear env |grep OPENSHIFT_PRIMARY_CARTRIDGE_DIR  

Actual results:
step 2: will give a incorrect response and messages: Application *** has deleted environment variables', but actually, the env variable "OPENSHIFT_PRIMARY_CARTRIDGE_DIR" have not been deleted
step 3: OPENSHIFT_PRIMARY_CARTRIDGE_DIR=/var/lib/openshift/fc190cda03bb11e3808c22000a9a8b73/php/ 

Expected results:
Should give a prompt like "OPENSHIFT_PRIMARY_CARTRIDGE_DIR" cannot be  deleted

Additional info:

Comment 1 Ravi Sankar 2013-08-20 23:10:06 UTC
After some discussion with the team, we want delete operation to be repeatable. Adding these checks during deletion will prevent that. So we only prevent reserved env vars to be overriden during add/modify operation.
Marking the bug as won't fix.


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