| Summary: | [origin_broker_86] User env variable is actually not created even if it returns created message from RESTAPI if the variable length >256 | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | weiwei jiang <wjiang> |
| Component: | Master | Assignee: | Ravi Sankar <rpenta> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.x | CC: | ffranz, wsun, xtian, zzhao |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-08-29 12:53:41 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: | |
|
Description
weiwei jiang
2013-08-20 10:28:59 UTC
Checked this with curl, no error is being returned: curl -k --user user:pass https://host/broker/rest/applications/<id>/environment-variables -X POST -d environment_variables[][name]='1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' -d environment_variables[][value]='BAR' Invalid testcase. Environment var limit is 512 bytes and not 256 bytes. (In reply to Fabiano Franz from comment #1) > Checked this with curl, no error is being returned: > > curl -k --user user:pass > https://host/broker/rest/applications/<id>/environment-variables -X POST -d > environment_variables[][name]='1111111111111111111111111111111111111111111111 > 11111111111111111111111111111111111111111111111111111111111111111111111111111 > 11111111111111111111111111111111111111111111111111111111111111111111111111111 > 11111111111111111111111111111111111111111111111111111111111' -d > environment_variables[][value]='BAR' Tested this issue again, if the env variable name >256 chars, the result returned from restapi will be created.But cannot find in env list. I misunderstood the issue before. Environment variable value limit is 512 bytes. Summary of the new changes: Added environment variable name limitations: - Limit length to 128 bytes. - Allow letters, digits and underscore but can't begin with digit Allow '=' or ' ' in the environment variable value. Commit pushed to master at https://github.com/openshift/li https://github.com/openshift/li/commit/fb602f72e86d6926f92b9d6ec8509affda4f648a Merge pull request #1845 from pravisankar/dev/ravi/bug998905 Merged by openshift-bot Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/f271a2628b8e31fe523d94de8c4b4d98d5352245 Merge pull request #3452 from pravisankar/dev/ravi/bug998905 Merged by openshift-bot Test on devenv_3683 and as follow:
1.for i in `seq 64`; do echo -n "asdf" >> file; done
2. rhc env set `cat file`=asdf -a php
Setting environment variable(s) ... done
3. rhc env list -a php
no output
And then I found that variable name contains <=255 chars, it will be added
And if variable name contains >255 chars, It will pass but will be not added (env list)
Need to test the fix on devenv_3684 Test on devenv_3684 and result is :
1.for i in `seq 64`; do echo -n "asdf" >> file; done
2. rhc env set `cat file`=asdf -a php
Setting environment variable(s) ... done
3. rhc env list -a php
no output
When variable name contains <=255 chars, it will be added
And if variable name contains >255 chars, It will pass but will be not added (env list)
Test on devenv_3685 and result is: Setting environment variable(s) ... name 'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee' exceeds maximum size of 128b so verified this, thx |