Bug 1743487

Summary: duplicate error output can not be compressed for kubeletconfig
Product: OpenShift Container Platform Reporter: MinLi <minmli>
Component: NodeAssignee: Ryan Phillips <rphillips>
Status: CLOSED ERRATA QA Contact: Sunil Choudhary <schoudha>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, jokerman, rphillips
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1757209 (view as bug list) Environment:
Last Closed: 2019-10-16 06:36:35 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:
Bug Depends On:    
Bug Blocks: 1757195, 1757209, 1762344    

Description MinLi 2019-08-20 06:15:38 UTC
Description of problem:
when create a kubeletconfig with grammar mistake, it shows duplicate error output which can not be compressed 

Version-Release number of selected component (if applicable):
$ oc version 
oc v4.0.0-alpha.0+1cdd4a1-781
kubernetes v1.11.0+1cdd4a1
Server https://api.qe-gpei-proxypub.qe.devcluster.openshift.com:6443
kubernetes v1.14.0+4a6419e

$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.2.0-0.nightly-2019-08-15-205330   True        False         23h       Cluster version is 4.2.0-0.nightly-2019-08-15-205330

How reproducible:
always

Steps to Reproduce:
1.$ oc create -f worker-kube-config-unsysctl.yaml
cat worker-kube-config-unsysctl.yaml :
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
  name: custom-kubelet
spec:
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: sysctl
  kubeletConfig:
    allowedUnsafeSysctls: "kernel.msg*,net.ipv4.route.min_pmtu"

2.$ oc get kubeletconfig  custom-kubelet -o yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
  creationTimestamp: 2019-08-20T05:43:25Z
  generation: 1
  name: custom-kubelet
  resourceVersion: "411266"
  selfLink: /apis/machineconfiguration.openshift.io/v1/kubeletconfigs/custom-kubelet
  uid: 6d9e6b3f-c30d-11e9-a024-0050568b2785
spec:
  kubeletConfig:
    allowedUnsafeSysctls: kernel.msg*,net.ipv4.route.min_pmtu
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: sysctl
status:
  conditions:
  - lastTransitionTime: 2019-08-20T05:43:25Z
    message: 'Error: KubeletConfig could not be unmarshalled, err: json: cannot unmarshal
      string into Go struct field KubeletConfiguration.allowedUnsafeSysctls of type
      []string'
    status: "False"
    type: Failure
  - lastTransitionTime: 2019-08-20T05:43:25Z
    message: 'Error: KubeletConfig could not be unmarshalled, err: json: cannot unmarshal
      string into Go struct field KubeletConfiguration.allowedUnsafeSysctls of type
      []string'
    status: "False"
    type: Failure
  - lastTransitionTime: 2019-08-20T05:43:26Z
    message: 'Error: KubeletConfig could not be unmarshalled, err: json: cannot unmarshal
      string into Go struct field KubeletConfiguration.allowedUnsafeSysctls of type
      []string'
    status: "False"
    type: Failure
  - lastTransitionTime: 2019-08-20T05:43:27Z
    message: 'Error: KubeletConfig could not be unmarshalled, err: json: cannot unmarshal
      string into Go struct field KubeletConfiguration.allowedUnsafeSysctls of type
      []string'
    status: "False"
    type: Failure
  - lastTransitionTime: 2019-08-20T05:43:30Z
    message: 'Error: KubeletConfig could not be unmarshalled, err: json: cannot unmarshal
      string into Go struct field KubeletConfiguration.allowedUnsafeSysctls of type
      []string'
    status: "False"
    type: Failure
  - lastTransitionTime: 2019-08-20T05:43:35Z
    message: 'Error: KubeletConfig could not be unmarshalled, err: json: cannot unmarshal
      string into Go struct field KubeletConfiguration.allowedUnsafeSysctls of type
      []string'
    status: "False"
    type: Failure
  - lastTransitionTime: 2019-08-20T05:43:45Z
    message: 'Error: KubeletConfig could not be unmarshalled, err: json: cannot unmarshal
      string into Go struct field KubeletConfiguration.allowedUnsafeSysctls of type
      []string'
    status: "False"
    type: Failure



Actual results:
1.kubeletconfig create success
2.show duplicate error output

Expected results:
2.duplicate error output can be compressed

Additional info:

Comment 1 Seth Jennings 2019-08-20 14:14:06 UTC
We fixed something like this in https://github.com/openshift/machine-config-operator/pull/811

I guess this is still possible.

Comment 3 MinLi 2019-08-23 06:19:58 UTC
verified on version : 4.2.0-0.nightly-2019-08-22-201424

Comment 4 Ryan Phillips 2019-09-30 20:23:56 UTC
*** Bug 1757203 has been marked as a duplicate of this bug. ***

Comment 5 errata-xmlrpc 2019-10-16 06:36:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2922