Bug 1048758
| Summary: | Unable to modify app;a env variable via REST | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Oleg Fayans <ofayans> | ||||
| Component: | Pod | Assignee: | Dan McPherson <dmcphers> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 1.x | CC: | alyoung, amarecek, baulakh, dmcphers, gpei, jhou | ||||
| 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: | 2014-02-18 03:27:21 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: | |||||||
| Attachments: |
|
||||||
|
Description
Oleg Fayans
2014-01-06 10:10:11 UTC
same problem with unsetting the env var: curl -k -X DELETE https://ec2-54-196-165-106.compute-1.amazonaws.com/broker/rest/application/52cd62f6f017aea3310002f6/environment-variables/foo fails to find corresponding route @ofayans You need to change environment-variables to be environment-variable for PUT and DELETE I will transfer the bug to get the doc fixed. -Dan Note: Also GET in the docs of a single variable should use the singular environment-variable. Modified the path, now the response is as follows: $ curl -k -X PUT https://ec2-23-23-29-188.compute-1.amazonaws.com/broker/rest/application/52e7cd00a661de34c400025c/environment-variable/OPENSHIFT_DATA_DIR.json --data-urlencode value=1234 -u ofayans:redhat {"api_version":1.6,"data":null,"messages":[{"exit_code":189,"field":null,"index":null,"severity":"error","text":"Environment name 'OPENSHIFT_DATA_DIR' not found in application"}],"status":"not_found","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6],"type":null,"version":"1.6"} Should be exit_code 403 and error text something like: cannot be overridden You can't modify system env vars with the api. Only user set env vars. Agree, but let's at least make error message more meaningful. Because now it informs the user that there is no such ENV variable in the app, which is clearly not true Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/1f7c77534c17fda73cc262295daf2b1e0df4cb53 Bug 1048758 Verified on devenv_4302 The messgae to the user is improved curl -s -k -H "content-type: application/json" -u jhou:redhat https://ec2-184-73-38-27.compute-1.amazonaws.com/broker/rest/application/52e9cc23444416b526000006/environment-variable/OPENSHIFT_DATA_DIR -X GET {"api_version":1.6,"data":null,"messages":[{"exit_code":189,"field":null,"index":null,"severity":"error","text":"User environment variable named 'OPENSHIFT_DATA_DIR' not found in application"}],"status":"not_found","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6],"type":null,"version":"1.6"} |