Bug 1698235

Summary: `oc describe` displays labels with invalid spacing and capitalization, fix is in upstream
Product: OpenShift Container Platform Reporter: Kirsten Garrison <kgarriso>
Component: MasterAssignee: Michal Fojtik <mfojtik>
Status: CLOSED DUPLICATE QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-10 16:37:57 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 Kirsten Garrison 2019-04-09 21:14:35 UTC
Description of problem:
This is from Bug 1696397, which is not an MCO bug but an `oc describe` bug that was fixed in upstream a few weeks ago:

oc describe on several machineconfig apis displays labels names with corrupting spacing and capitalization. 

For example (from `oc describe machineconfigpool worker`):
>>>>>
Spec:
  Machine Config Selector:
    Match Labels:
      Machineconfiguration . Openshift . Io / Role:  worker
  Machine Selector:
    Match Labels:
      Node - Role . Kubernetes . Io / Worker:  
<<<<<

Version-Release number of selected component (if applicable):
4.0.0-0.9

How reproducible:
100%

Steps to Reproduce:
1. oc describe machineconfigpool worker
2.
3.

Actual results:
Label names corrupted with spacing and capitalization..
 Machineconfiguration . Openshift . Io / Role:  worker

Expected results:
 machineconfiguration.openshift.io/role: worker

Additional details:
Other resources are also affected (e.g. machinesets)


Additional info:
This is related to kubectl's describe. The smartLabelFor() function is what is adding the capitalization and the spaces:
 : https://github.com/kubernetes/kubernetes/blob/fd98e7abf042251bb094a5535d67f53d36021246/pkg/kubectl/describe/versioned/describe.go#L306


However ~2 weeks ago, a PR was merged into the upstream that fixes this issue:
https://github.com/kubernetes/kubernetes/pull/75483

To fix this we'd have to update our oc which is using 1.13 currently.

According to the original issue filing upstream, the fix will be in v1.15:
https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/260#issuecomment-478585501

Was told that as of right now 1.15 (containing this fix) would be pulled into 4.3

Opening this in the proper proper BZ component to have this issue tracked for an eventual fix.

Comment 1 Xingxing Xia 2019-04-10 02:16:57 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1656328

Comment 2 Kirsten Garrison 2019-04-10 16:37:57 UTC

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