Bug 998794

Summary: [origin_broker_86] It does not support for setting blank value for a user environment variable
Product: OpenShift Online Reporter: zhaozhanqi <zzhao>
Component: MasterAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: rpenta, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-29 12:53:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhaozhanqi 2013-08-20 05:51:16 UTC
Description of problem:
if set one value to blank, it will show 'Value not specified for environment variable '#{name}'

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

How reproducible:
always

Steps to Reproduce:
1. create one app
2. add one env variable and its value set to blank for that app
   curl -k -H 'Accept: application/xml' --user $user:$pass https://ec2-50-16-53-228.compute-1.amazonaws.com/broker/rest/applications/441479955229558381215744/environment-variables -X POST -d name=foo1 -d value=

Actual results:
    <message>
      <severity>error</severity>
      <text>Value not specified for environment variable 'foo1'</text>
      <exit-code>190</exit-code>

Expected results:

should be set successfully and its value will be foo1=

Additional info:
the env variable's value should support blank,like 

[zqzhao@dhcp-13-222 build]$ rhc ssh app --gear env |grep SELINUX_
SELINUX_ROLE_REQUESTED=
SELINUX_USE_CURRENT_RANGE=
SELINUX_LEVEL_REQUESTED=

Comment 1 Ravi Sankar 2013-08-20 19:42:01 UTC
Fixed in https://github.com/openshift/origin-server/pull/3439

Comment 2 openshift-github-bot 2013-08-21 00:41:01 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b80bdce049f77c1be53261f2f38a030201569520
Bug 998794 - Allow blank value for a user environment variable

Bug 998768 - Allow char '=' in the enviroment variable

Bug 998891 - Remove env var should always call rsync on all other gears from head gear

Comment 3 zhaozhanqi 2013-08-22 02:39:02 UTC
Tested this issue in devenv_stage_448, it has been fixed

curl -k -H 'Accept: application/xml' --user zzhao:redhat https://$instance/broker/rest/applications/479428171624072284733440/environment-variables -X POST -d name=foo1 -d value=

[zqzhao@dhcp-13-222 .openshift]$ rhc ssh zqphp --gear env|grep foo
foo1=