Bug 1923874 - Unable to specify values with % in kubeletconfig
Summary: Unable to specify values with % in kubeletconfig
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 4.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.7.0
Assignee: Harshal Patil
QA Contact: MinLi
URL:
Whiteboard:
Depends On:
Blocks: 1915235
TreeView+ depends on / blocked
 
Reported: 2021-02-02 06:30 UTC by Harshal Patil
Modified: 2021-02-24 15:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:57:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 2383 0 None closed Bug 1923874: KubeletConfig: Revert "Fix KubeletConfig validation for invalid values" 2021-02-18 05:54:58 UTC
Github openshift machine-config-operator pull 2390 0 None closed Bug 1923874: KubeletConfig: Drop validation for kubeletconfig 2021-02-18 05:54:59 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:58:06 UTC

Description Harshal Patil 2021-02-02 06:30:27 UTC
Description of problem:
https://github.com/openshift/machine-config-operator/pull/2314 introduced a regression which is not allowing values ending with % sign in the kubeletconfig

Comment 1 Harshal Patil 2021-02-02 06:32:46 UTC
Validation if kubeletconfig fields is no longer going to be supported going forward, https://github.com/openshift/machine-config-operator/issues/2357

Hence, instead of fixing it for parsing for percentage (and other things), we will just revert that PR.

Comment 4 MinLi 2021-02-03 09:02:48 UTC
Hi, Harshal Patil
I'd like to confirm I get your point, we just need to validate positive percentage value is acceptable by kubeletconfig.

Comment 5 Harshal Patil 2021-02-03 09:18:32 UTC
We will not support any validation in kubeletconfig (however I didn't remove the validation code that already exists). That's the reason I added a warning in CRD to let users know that validation will not be duplicated in MCO that already exists in upstream, https://github.com/openshift/machine-config-operator/pull/2358

Comment 6 MinLi 2021-02-03 10:45:07 UTC
@Harshal Patil, got you, yet I found the existing validation didn't work as expected. 
At least, percentage value should be allowed, for our doc introduce we can use value with % in kubeletconfig, FYI:https://docs.openshift.com/container-platform/4.6/nodes/nodes/nodes-nodes-garbage-collection.html#nodes-nodes-garbage-collection-configuring_nodes-nodes-configuring


$ oc get clusterversion 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2021-02-02-223803   True        False         4h33m   Cluster version is 4.7.0-0.nightly-2021-02-02-223803

spec:
  kubeletConfig:
    evictionPressureTransitionPeriod: 0s
    evictionSoft:
      memory.available: 20Gi
      nodefs.available: 6%
      nodefs.inodesFree: 5%
    evictionSoftGracePeriod:
      memory.available: 1h
      nodefs.available: 1h
      nodefs.inodesFree: 1h
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: small-pods
status:
  conditions:
  - lastTransitionTime: "2021-02-03T10:31:56Z"
    message: 'Error: KubeletConfiguration: invalid value specified for nodefs.available
      reservation in evictionSoft, 6%'
    status: "False"
    type: Failure

Comment 10 MinLi 2021-02-07 07:52:49 UTC
verified on version : 4.7.0-0.nightly-2021-02-06-084550

spec:
  kubeletConfig:
    evictionHard:
      imagefs.available: 20Gi
      imagefs.inodesFree: 5%
      memory.available: 200Mi
      nodefs.available: 5%
      nodefs.inodesFree: 4%
    evictionPressureTransitionPeriod: 5s
    imageGCHighThresholdPercent: 80
    imageGCLowThresholdPercent: 75
    imageMinimumGCAge: 5m
    maxPods: 240
    podsPerCore: 80
  machineConfigPoolSelector:
    matchLabels:
      custom-kubelet: small-pods
status:
  conditions:
  - lastTransitionTime: "2021-02-07T07:15:17Z"
    message: Success
    status: "True"
    type: Success


So the previous fixes which are related with kubeletconfig field validation are deprecated, such as https://bugzilla.redhat.com/show_bug.cgi?id=1745919 and https://bugzilla.redhat.com/show_bug.cgi?id=1805019

Comment 13 errata-xmlrpc 2021-02-24 15:57:46 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633


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