Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2092851

Summary: [Descheduler]: allow to customize the LowNodeUtilization strategy thresholds
Product: OpenShift Container Platform Reporter: Jan Chaloupka <jchaloup>
Component: kube-schedulerAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED ERRATA QA Contact: RamaKasturi <knarra>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.11CC: mfojtik
Target Milestone: ---   
Target Release: 4.11.0   
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: 2022-08-10 11:15:49 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 Jan Chaloupka 2022-06-02 11:08:48 UTC
Description of problem:
The currently provided LowNodeUtilization target and targetThresholds are too generic to cover other scenarios. Instead of pinning the thresholds let's provide three basic categories:
- "Low" for 10%:30% ratio
- "Medium" for 20%:50% ratio
- "High" for 40%:70% ratio

The customization is experimental and thus the new field is prefixed with "Dev" keyword to make it clear.

Comment 2 RamaKasturi 2022-06-09 18:22:09 UTC
Verified the bug with the build below and i see that LowNodeUtilization works fine.

4.11.0-0.nightly-2022-06-06-201913 

Below are the test steps i followed to check the same:
======================================================
1. Set profile as LifecycleAndUtilization with profileCustomization set to devLowNodeUtilizationThresholds with a value of "High" which sets the thresholds to 40% to 70% and verify that when nodes meet that criteria pods are evicted.

kubedescheduler cluster yaml file:
===================================
profileCustomizations:
      devLowNodeUtilizationThresholds: High
      namespaces: {}
    profiles:
    - LifecycleAndUtilization
    unsupportedConfigOverrides: null

configmap file:
===================
    strategies:
      LowNodeUtilization:
        enabled: true
        params:
          includePreferNoSchedule: false
          includeSoftConstraints: false
          labelSelector: null
          namespaces: null
          nodeFit: false
          nodeResourceUtilizationThresholds:
            targetThresholds:
              cpu: 70
              memory: 70
              pods: 70
            thresholds:
              cpu: 40
              memory: 40
              pods: 40
          thresholdPriority: null
          thresholdPriorityClassName: ""

2. Set profile as LifecycleAndUtilization with profileCustomization set to devLowNodeUtilizationThresholds with a value of "Medium" (This is default as well) which sets the thresholds to 20% to 50% and verify that when nodes meet that criteria pods are evicted.

kubedescheduler cluster yaml file:
===================================
profileCustomizations:
      devLowNodeUtilizationThresholds: High
      namespaces: {}
    profiles:
    - LifecycleAndUtilization
    unsupportedConfigOverrides: null

configmap file:
===================
    strategies:
      LowNodeUtilization:
        enabled: true
        params:
          includePreferNoSchedule: false
          includeSoftConstraints: false
          labelSelector: null
          namespaces: null
          nodeFit: false
          nodeResourceUtilizationThresholds:
            targetThresholds:
              cpu: 50
              memory: 50
              pods: 50
            thresholds:
              cpu: 20
              memory: 20
              pods: 20
          thresholdPriority: null
          thresholdPriorityClassName: ""
3. Set profile as LifecycleAndUtilization with profileCustomization set to devLowNodeUtilizationThresholds with a value of "Low" which sets the thresholds to 10% to 30% and verify that when nodes meet that criteria pods are evicted.

kubedescheduler cluster yaml file:
===================================
profileCustomizations:
      devLowNodeUtilizationThresholds: High
      namespaces: {}
    profiles:
    - LifecycleAndUtilization
    unsupportedConfigOverrides: null

configmap file:
===================
    strategies:
      LowNodeUtilization:
        enabled: true
        params:
          includePreferNoSchedule: false
          includeSoftConstraints: false
          labelSelector: null
          namespaces: null
          nodeFit: false
          nodeResourceUtilizationThresholds:
            targetThresholds:
              cpu: 30
              memory: 30
              pods: 30
            thresholds:
              cpu: 10
              memory: 10
              pods: 10
          thresholdPriority: null
          thresholdPriorityClassName: ""

Based on the above moving bug to verified state.

Comment 4 errata-xmlrpc 2022-08-10 11:15:49 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security 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-2022:5069