Description of problem: when set invalid value for reserved resource in kubeletconfig, there will tip no error. Version-Release number of selected component (if applicable): 4.2.0-0.nightly-2019-08-25-233755 How reproducible: always Steps to Reproduce: 1.$ oc label machineconfigpool worker custom-kubelet=set-reserved 2.$ oc create -f custom-kubelet-reserved.yaml custom-kubelet-reserved.yaml: apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: name: set-reserved spec: machineConfigPoolSelector: matchLabels: custom-kubelet: set-reserved kubeletConfig: kubeReserved: cpu: -200m memory: -200G systemReserved: cpu: -200m memory: -200G 3.$ oc get kubeletconfig set-reserved -o yaml apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: creationTimestamp: 2019-08-27T06:54:13Z finalizers: - 99-worker-fb06c452-c7ed-11e9-945a-fa163ee5f427-kubelet generation: 1 name: set-reserved resourceVersion: "448294" selfLink: /apis/machineconfiguration.openshift.io/v1/kubeletconfigs/set-reserved uid: 7a99caa1-c897-11e9-bebe-fa163efc6e80 spec: kubeletConfig: kubeReserved: cpu: -200m memory: -200G systemReserved: cpu: -200m memory: -200G machineConfigPoolSelector: matchLabels: custom-kubelet: set-reserved status: conditions: - lastTransitionTime: 2019-08-27T06:54:13Z message: Success status: "True" type: Success Actual results: 2.create kubeletconfig succ 3.show kubeletconfig status Success Expected results: 3.show error info for invalid value Additional info:
besides negative value, other invalid value also tip no error, such as non-digital, fractional
@Robert Krawitz I found nothing about this kubeletconfig update in kubelet log. And machineconfigpool worker is always in updating status after apply this kubeletconfig. $ oc get machineconfigpool NAME CONFIG UPDATED UPDATING DEGRADED master rendered-master-16073f8c7a50faadb9277573fadb7ebc True False False worker rendered-worker-70387f4bb2bf331216124c30d4e0434c False True False
@Robert Krawitz, how do you check the kubelet log? Is it "$ journalctl -u kubelet.service "? For I reproduce the bug, yet not find the log as you pasted above.
(In reply to MinLi from comment #7) > @Robert Krawitz, > how do you check the kubelet log? Is it "$ journalctl -u kubelet.service "? > For I reproduce the bug, yet not find the log as you pasted above. Yes that is how you check that log.
I will look into this in upcoming sprint.
verified with version : 4.6.0-0.nightly-2020-07-05-192128 $ oc get kubeletconfig -o yaml apiVersion: v1 items: - apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: creationTimestamp: "2020-07-06T03:14:48Z" generation: 2 managedFields: - apiVersion: machineconfiguration.openshift.io/v1 fieldsType: FieldsV1 fieldsV1: f:status: .: {} f:conditions: {} manager: machine-config-controller operation: Update time: "2020-07-06T03:16:52Z" - apiVersion: machineconfiguration.openshift.io/v1 fieldsType: FieldsV1 fieldsV1: f:spec: .: {} f:kubeletConfig: .: {} f:kubeReserved: {} f:systemReserved: {} f:machineConfigPoolSelector: .: {} f:matchLabels: .: {} f:custom-kubelet: {} manager: oc operation: Update time: "2020-07-06T03:16:52Z" name: set-reserved resourceVersion: "41026" selfLink: /apis/machineconfiguration.openshift.io/v1/kubeletconfigs/set-reserved uid: 5eb44ae4-2577-4006-b5f4-238c2bd7fb6b spec: kubeletConfig: kubeReserved: cpu: q2asdm memory: qwqw200G systemReserved: cpu: asdas00m memory: sdfsdfG machineConfigPoolSelector: matchLabels: custom-kubelet: set-reserved status: conditions: - lastTransitionTime: "2020-07-06T03:14:48Z" message: 'Error: KubeletConfiguration: cpu reservation value cannot be negative in kubeReserved' status: "False" type: Failure - lastTransitionTime: "2020-07-06T03:16:52Z" message: 'Error: KubeletConfiguration: invalid value specified for cpu reservation in kubeReserved, q2asdm' status: "False" type: Failure kind: List metadata: resourceVersion: "" selfLink: ""
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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196