Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-28828

when realTimeKernel is false unable to remove workloadhints using performancev2.PerformanceProfile api

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Normal
    • None
    • 4.16.0
    • None
    • Important
    • No
    • CNF Compute Sprint 250, CNF Compute Sprint 251
    • 2
    • False
    • Hide

      None

      Show
      None

    Description

      using performancev2.PerformanceProfile api to disable/update the existing workload hints do not work if realTimeKernel is false. 

      For example:

      apiVersion: performance.openshift.io/v2
      kind: PerformanceProfile
      metadata:
        annotations:
          performance.openshift.io/ignore-cgroups-version: "true"
        creationTimestamp: "2024-02-01T11:58:58Z"
        finalizers:
        - foreground-deletion
        generation: 10
        name: performance
        resourceVersion: "55633"
        uid: 8aaa4cf9-94f0-4ee6-a8ac-869e7f5fe0f6
      spec:
        cpu:
          isolated: 0-2
          reserved: "3"
        net:
          userLevelNetworking: true
        nodeSelector:
          node-role.kubernetes.io/worker-cnf: ""
        numa:
          topologyPolicy: single-numa-node
        realTimeKernel:
          enabled: false
        workloadHints:
          realTime: true

      With above spec if we want to make realTime workload hint to false or disable the workload hints totally using performancev2.PerformanceProfile api by below method:

      Sample code:

      package main 
      
      import (
      "k8s.io/utils/pointer" 
      performancev2 "github.com/openshift/cluster-node-tuning-operator/pkg/apis/performanceprofile/v2" 
      testutils "github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils"
      "github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/profiles" 
      )
      
      func main() {
      
           var profile *performancev2.PerformanceProfile
           nodeLabel := testutils.NodeSelectorLabels
           profile, err = profiles.GetByNodeLabels(nodeLabel)
           profile.Spec.WorkloadHints.RealTime = pointer.Bool(false)  
           // or 
           // profile.Spec.WorkloadHints = nil 
           profile.Spec.RealTimeKernel = &performancev2.RealTimeKernel{ 
                 Enabled: pointer.Bool(false),
           }
           profiles.UpdateWithRetry(profile) 
           fmt.Println(profile) 
        
      }

      The expectation of the above code is to update the existing profile with above changes, but profile doesn't get modified

       

      Attachments

        Activity

          People

            rh-ee-rbaturov Ronny Baturov
            mniranja Mallapadi Niranjan
            Mallapadi Niranjan Mallapadi Niranjan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: