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:
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.