Bug 1569095 - Upgrade to 3.9 fails applying metadata.labels: Invalid value: \"node-role.kubernetes.io~1compute\
Summary: Upgrade to 3.9 fails applying metadata.labels: Invalid value: \"node-role.kub...
Keywords:
Status: CLOSED DUPLICATE of bug 1524305
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.9.z
Assignee: Juan Vallejo
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-18 15:24 UTC by hgomes
Modified: 2018-05-29 15:58 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-01 15:47:22 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1524305 0 medium CLOSED oc annotate fails if annotation name includes slash when using oc 3.7 VS server 3.9 2021-02-22 00:41:40 UTC

Internal Links: 1524305

Comment 2 Scott Dodson 2018-04-18 15:40:23 UTC
The command we're issuing is correct, why is the API throwing an error? 

/usr/local/bin/oc label node node1234 node-role.kubernetes.io/compute=true --overwrite", "results": {}, "returncode": 1, "stderr": "The Node \"node1234\" is invalid: metadata.labels: Invalid value: \"node-role.kubernetes.io~1compute\": name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')\n", "stdout": ""}}

Comment 3 hgomes 2018-04-18 18:18:30 UTC
ENVIRONMENT info:
Install is Containerized.
The servers are running Atomic 7.5.0. and oc binary is placed at: /usr/local/bin/oc

Comment 4 Michal Fojtik 2018-04-25 12:49:07 UTC
Seth might know if the validation was tightened in 3.9.

Comment 5 Michal Fojtik 2018-04-25 12:57:12 UTC
Can we also see oc get node lnyce34at7 -o yaml?

Comment 14 Xingxing Xia 2018-04-28 02:02:21 UTC
Against a normal 3.9 env, found:
path/to/v3.7/oc label node $NODE_NAME --overwrite node-role.kubernetes.io/compute=true # here my oc is v3.7.9
node "$NODE_NAME" labeled

path/to/v3.9/oc label node $NODE_NAME --overwrite node-role.kubernetes.io/compute=true # here my oc is v3.9.27
The Node "172.16.120.27" is invalid: metadata.labels: Invalid value: "node-role.kubernetes.io~1compute": name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')

Thus it is like the `oc annotate` bug 1524305 where the key includes slash

Comment 15 Xingxing Xia 2018-04-28 02:07:59 UTC
Sorry, above has paste mistake. It should be:
path/to/v3.7/oc label node $NODE_NAME --overwrite node-role.kubernetes.io/compute=true # here my oc is v3.7.9
The Node "$NODE_NAME" is invalid: metadata.labels: Invalid value: "node-role.kubernetes.io~1compute": name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')

path/to/v3.9/oc label node $NODE_NAME --overwrite node-role.kubernetes.io/compute=true # here my oc is v3.9.27
node "$NODE_NAME" labeled

Comment 17 Juan Vallejo 2018-05-01 15:43:32 UTC
OSE PR: https://github.com/openshift/ose/pull/1084

Comment 18 Jordan Liggitt 2018-05-01 15:47:22 UTC
this is a duplicate of 1524305

*** This bug has been marked as a duplicate of bug 1524305 ***

Comment 19 Jordan Liggitt 2018-05-01 15:49:16 UTC
oc 3.7 produced incorrect merge patches that the server accidentally tolerated

an upstream update in 1.8 we picked up in 3.8 stopped tolerating those incorrect patches.

https://github.com/openshift/ose/pull/1084 backports the fix to make the 3.7 client produce correct patches


Note You need to log in before you can comment on or make changes to this bug.