Bug 1257800
Summary: | Error information indicating wrong name and value in command 'oc label', 'oc env' are duplicated | ||
---|---|---|---|
Product: | OKD | Reporter: | Yadan Pei <yapei> |
Component: | oc | Assignee: | Juan Vallejo <jvallejo> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Yan Du <yadu> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 3.x | CC: | aos-bugs, jvallejo, mmccomas, wmeng, xxia |
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:05 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
Yadan Pei
2015-08-28 06:11:28 UTC
Hm, I cannot seem to replicate steps 3 and 5 oc version: oc v1.3.0-alpha.0+8e93729-dirty kubernetes v1.3.0+507d3a7 features: Basic-Auth $ oc env rc/database-1 123$##%$#%=self there is no need to specify a resource type as a separate argument when passing arguments in resource/name form (e.g. 'oc get resource/<resource_name>' instead of 'oc get resource resource/<resource_name>' $ oc label po/database-1-fn0r7 deployment=@#$^^ error: invalid label value: "deployment=@#": must match the regex (([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])? (e.g. 'MyValue' or 'my_value' or '12345') See 'oc label -h' for help and examples. Note: Adding a label with an invalid key (step 4) does give me the same error multiple times, I will look into that. Related PR: https://github.com/openshift/origin/pull/10317 Invalid Env Name for 'oc set env' # oc set env rc/database-1 test-abc=1234 error: ReplicationController "database-1" is invalid: [spec.template.spec.containers[0].env[5].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName", spec.template.spec.containers[0].env[5].name: Invalid value: "test-abc": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName"] Invalid Label Name for 'oc label' # oc label pod/database-1-rxol6 qwer1345@-abc=self -n yapei-bug The Pod "database-1-rxol6" is invalid. metadata.labels: Invalid value: "qwer1345@-abc": 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') Invalid Label Value for 'oc label' # oc label pod/database-1-rxol6 self=qwer1345@-abc -n yapei-bug error: invalid label value: "self=qwer1345@-abc": must match the regex (([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])? (e.g. 'MyValue' or 'my_value' or '12345') See 'oc label -h' for help and examples. For 'oc label' we got error message only once However we still get duplicated error message for 'oc set env'(since 'oc env' is DEPRECATED:This command has been moved to "oc set env") Thanks for catching this. Related PR: https://github.com/openshift/origin/pull/10613 Fixed in: openshift v1.3.0-alpha.3+d8c9694 kubernetes v1.3.0+507d3a7 etcd 2.3.0+git [xxia@ip-172-18-13-122 ~]$ oc env rc/database-1 123$##%$#%=self error: environment variables must be of the form key=value and can only contain letters, numbers, and underscores [xxia@ip-172-18-13-122 ~]$ oc label pod/database-1-5gohf qwer1345%$$#=self The Pod "database-1-5gohf" is invalid. metadata.labels: Invalid value: "qwer1345%3880#": 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') Now error message is not duplicated |