| Summary: | oc process does not emit a non-zero exit code on invalid values | ||
|---|---|---|---|
| Product: | OKD | Reporter: | Chris Ryan <cryan> |
| Component: | oc | Assignee: | Steve Kuznetsov <skuznets> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Wei Sun <wsun> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | aos-bugs, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-12-09 21:52:17 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
Chris Ryan
2016-04-25 21:47:11 UTC
pretty sure Steve is already fixing this here: https://github.com/openshift/origin/pull/8049 Tested today on master, seems to work as desired: $ oc version oc v1.4.0-alpha.0+33f3e8f kubernetes v1.4.0+776c994 features: Basic-Auth Server https://10.13.137.202:8443 openshift v1.4.0-alpha.0 kubernetes v1.4.0-beta.3+d19513f $ wget https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/build/ruby22rhel7-template-sti.json $ vim ruby22rhel7-template-sti.json # add "label!!": "value1" to the last JSON stanza as described above $ oc process -f ruby22rhel7-template-sti.json error: error processing the template "ruby-helloworld-sample": Template "ruby-helloworld-sample" is invalid: labels: Invalid value: "label!!": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc') $ echo $? 1 Verified with: $ oc version oc v1.3.0 kubernetes v1.3.0+52492b4 oc v1.4.0-alpha.0+43d24b2 kubernetes v1.4.0+776c994 $ oc process -f ruby22rhel7-template-sti.json error: error processing the template "ruby-helloworld-sample": Template "ruby-helloworld-sample" is invalid: labels: Invalid value: "label!!!": name part must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc') $ echo $? 1 |