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

Prevent empty value setting in spec.profile.name and recommend.profile of custom profile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • None
    • 4.14
    • Node Tuning Operator
    • None

      Description of problem:

      When we create custom profile without sepc.profile.name and recommend.profile , NTO will prevent to create the profile, but if the value set to empty, the profile file will become unknow state. 

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

       

      How reproducible:

       

      Steps to Reproduce:

      create profile like as below:
      cat all-nodes-tuned.yaml 
      apiVersion: tuned.openshift.io/v1
      kind: Tuned
      metadata:
       name: tuning-all-nodes
       namespace: openshift-cluster-node-tuning-operator
      spec:
       profile:
       - data: |
           [main]
           summary=Custom OpenShift ntotuning profile
           include=openshift-control-plane,openshift-node
           [sysctl]
           vm.max_map_count=2543750
         name: ""
       
       recommend:
         - priority: 20
           profile: ""
           #profile: tuning-all-nodes 

      Actual results:

      The profile can be created even if the value of sepc.profile.name and recommend.profile is empty, it cause the pod crashed and profile state to unknown.
      oc get pods -n openshift-cluster-node-tuning-operator 
      NAME                                            READY   STATUS      RESTARTS      AGE
      cluster-node-tuning-operator-575d67577c-c725n   1/1     Running     0             36m
      tuned-26wjs                                     0/1     Completed   2 (15s ago)   29m
      tuned-788h2                                     0/1     Completed   2 (15s ago)   29m
      tuned-hqzgw                                     0/1     Completed   2 (15s ago)   32m
      tuned-l62rq                                     0/1     Completed   1 (16s ago)   29m
      tuned-m2mcq                                     0/1     Completed   2 (15s ago)   32m
      tuned-pg25v                                     0/1     Completed   2 (14s ago)   32m
      oc get profile -n openshift-cluster-node-tuning-operator
      NAME                                         TUNED   APPLIED   DEGRADED   AGE
      ip-10-0-129-130.us-east-2.compute.internal           Unknown   Unknown    38m
      ip-10-0-155-12.us-east-2.compute.internal            Unknown   Unknown    40m
      ip-10-0-170-104.us-east-2.compute.internal           Unknown   Unknown    38m
      ip-10-0-182-79.us-east-2.compute.internal            Unknown   Unknown    40m
      ip-10-0-193-250.us-east-2.compute.internal           Unknown   Unknown    38m
      ip-10-0-200-4.us-east-2.compute.internal             Unknown   Unknown    40m

      Expected results:

      prevent empty value when apply the custom profile

      Additional info:

       

              jmencak Jiri Mencak
              rhn-support-liqcui Liquan Cui
              Liquan Cui Liquan Cui
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: