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

Invalid PerformanceProfile cpus panics on validation webhook

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.18, 4.19
    • Node Tuning Operator
    • None
    • CNF Compute Sprint 264
    • 1
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      Application of PerformanceProfile with invalid cpuset in one of the reserved/isolated/shared/offlined cpu fields causing webhook validation to panic instead of returning an informant error.

      Version-Release number of selected component (if applicable):

      4.18.0-0.nightly-2024-11-22-231049

      How reproducible:

      Apply a PerformanceProfile with invalid cpu values

      Steps to Reproduce:

      Apply the following PerformanceProfile with invalid cpu values:
      
      apiVersion: performance.openshift.io/v2
      kind: PerformanceProfile
      metadata:
        name: pp
      spec:
        cpu:
          isolated: 'garbage'
          reserved: 0-3
        machineConfigPoolSelector:
          pools.operator.machineconfiguration.openshift.io/worker-cnf: ""
        nodeSelector:
          node-role.kubernetes.io/worker-cnf: ""     

      Actual results:

      On OCP >= 4.18 the error is:
      Error from server: error when creating "pp.yaml": admission webhook "vwb.performance.openshift.io" denied the request: panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        
      On OCP <= 4.17 the error is:
      Validation webhook passes without any errors. Invalid configuration propogates to the cluster and breaks it.

      Expected results:

      We expect to pushback an informant error when invalid cpuset has been entered, without panicking or accepting it!

              rh-ee-rbaturov Ronny Baturov
              rh-ee-rbaturov Ronny Baturov
              Roy Shemtov Roy Shemtov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: