Bug 996353 - [fork][origin_broker_86]It shows incorrect error message while deleting some special env variables or in .env
[fork][origin_broker_86]It shows incorrect error message while deleting some ...
Status: CLOSED WONTFIX
Product: OpenShift Online
Classification: Red Hat
Component: REST API (Show other bugs)
2.x
All All
medium Severity medium
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-12 23:17 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 19:10:06 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-12 23:17:09 EDT
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 19:10:06 EDT
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.