Bug 1757209 - [4.1] duplicate error output can not be compressed for kubeletconfig
Summary: [4.1] duplicate error output can not be compressed for kubeletconfig
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 4.1.z
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.1.z
Assignee: Ryan Phillips
QA Contact: MinLi
URL:
Whiteboard:
Depends On: 1743487
Blocks: 1757195
TreeView+ depends on / blocked
 
Reported: 2019-09-30 20:24 UTC by Ryan Phillips
Modified: 2020-01-20 18:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1743487
: 1762344 (view as bug list)
Environment:
Last Closed: 2020-01-20 18:16:07 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 1140 0 'None' closed Bug 1757209: Do not requeue a failed kubeletconfig decode 2021-01-13 02:53:29 UTC

Comment 4 MinLi 2019-10-18 06:03:08 UTC
in latest 4.1 version , I created kubeletconfig  with grammar mistake succeed, but in fact it didn't take effect by checking node file kubelet.conf
version : 4.1.0-0.nightly-2019-10-15-144852

$ oc create -f worker-kube-config-unsysctl.yaml
kubeletconfig.machineconfiguration.openshift.io/custom-kubelet created

$ oc get kubeletconfig  custom-kubelet -o yaml
apiVersion: v1
items:
- apiVersion: machineconfiguration.openshift.io/v1
  kind: KubeletConfig
  metadata:
    creationTimestamp: "2019-10-18T03:17:41Z"
    finalizers:
    - 99-worker-bf8a9bb9-f14f-11e9-b033-02712fe80cde-kubelet
    generation: 1
    name: custom-kubelet
    resourceVersion: "24745"
    selfLink: /apis/machineconfiguration.openshift.io/v1/kubeletconfigs/custom-kubelet
    uid: d850fe74-f155-11e9-b618-0ada85150c4e
  spec:
    kubeletConfig:
      allowedUnsafeSysctls: kernel.msg*,net.ipv4.route.min_pmtu
    machineConfigPoolSelector:
      matchLabels:
        custom-kubelet: sysctl
  status:
    conditions:
    - lastTransitionTime: "2019-10-18T03:17:41Z"
      message: Success
      status: "True"
      type: Success
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Comment 5 MinLi 2019-10-18 08:54:39 UTC
Given sysctl is not supported in 4.1, I test another kubeletconfig with grammar mistake. When execute "oc get kubeletconfig XX -o yaml", display info lack "status" part.

custom-kubelet-test.yaml:
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
  name: set-reserved
spec:
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: set-reserved
  kubeletConfig:
    kubeReserved: cpu-200m
    systemReserved:
      cpu: -200m
      memory: -200G 

$  oc create -f custom-kubelet-test.yaml
kubeletconfig.machineconfiguration.openshift.io/set-reserved created

$ oc get kubeletconfig set-reserved -o yaml 
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
  creationTimestamp: "2019-10-18T07:42:23Z"
  generation: 1
  name: set-reserved
  resourceVersion: "106254"
  selfLink: /apis/machineconfiguration.openshift.io/v1/kubeletconfigs/set-reserved
  uid: d2ca8ff3-f17a-11e9-8d73-02887a1920e0
spec:
  kubeletConfig:
    kubeReserved: cpu-200m
    systemReserved:
      cpu: -200m
      memory: -200G
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: set-reserved

the same command in version 4.2 will return:

$  oc get kubeletconfig set-reserved -o yaml 
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
  creationTimestamp: "2019-10-18T07:45:10Z"
  generation: 1
  name: set-reserved
  resourceVersion: "128858"
  selfLink: /apis/machineconfiguration.openshift.io/v1/kubeletconfigs/set-reserved
  uid: 3684bc07-f17b-11e9-9ef4-0a69a8c91d52
spec:
  kubeletConfig:
    kubeReserved: cpu-200m
    systemReserved:
      cpu: -200m
      memory: -200G
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: set-reserved
status:
  conditions:
  - lastTransitionTime: "2019-10-18T07:45:10Z"
    message: 'Error: KubeletConfig could not be unmarshalled, err: json: cannot unmarshal
      string into Go struct field KubeletConfiguration.kubeReserved of type map[string]string'
    status: "False"
    type: Failure


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