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

ClusterResourceOverride operator fails to reconcile the clusterresourceoverride-configuration configMap

XMLWordPrintable

    • Moderate
    • None
    • 3
    • PODAUTO - Sprint 265
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      *Cause*: If you specify the a `forceSelinuxRelabel` field in a ClusterResourceOverride CR and then modify it afterwards, the change would not be reflected in the clusterresourceoverride-configuration ConfigMap which is used to apply the selinux relabelling workaround feature.
      *Consequence*: The change is not reflected in the ConfigMap.
      *Fix*: Allow the operator to track the change to the forceSelinuxRelabel feature in order to reconcile the configMap.
      *Result*: Now the configMap is correctly changed when you change the ClusterResourceOverride CR field.
      Show
      *Cause*: If you specify the a `forceSelinuxRelabel` field in a ClusterResourceOverride CR and then modify it afterwards, the change would not be reflected in the clusterresourceoverride-configuration ConfigMap which is used to apply the selinux relabelling workaround feature. *Consequence*: The change is not reflected in the ConfigMap. *Fix*: Allow the operator to track the change to the forceSelinuxRelabel feature in order to reconcile the configMap. *Result*: Now the configMap is correctly changed when you change the ClusterResourceOverride CR field.
    • Bug Fix
    • Proposed

      Description of problem:

      • In a 4.14.33 cluster, with CRO Operator 1.0.0, and while following up the steps described in the "Semi - Automatic Skip SELinux Relabeling with spc_t (OCP Version 4.13+)" section [0], we're seeing the CRO operator failing to reconcile and propagate the .spec properties from the CustomResource to the clusterresourceoverride-configuration configmap.
      [0] https://access.redhat.com/solutions/6221251

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

      4.14.33
      CRO operator 1.0.0

      How reproducible:

      N/A

      Actual results (i.e. not the different forceSelinuxRelabel values):

      $ omc -n clusterresourceoverride-operator get cm clusterresourceoverride-configuration -o yaml
      apiVersion: v1
      data:
        configuration.yaml: |
          spec:
            cpuRequestToLimitPercent: 5
            forceSelinuxRelabel: false   <<<<<<<<<<==========
            limitCPUToMemoryPercent: 0
            memoryRequestToLimitPercent: 5
      kind: ConfigMap
      metadata:
        creationTimestamp: "2024-11-12T03:51:41Z"
        labels:
          operator.autoscaling.openshift.io/clusterresourceoverride: "true"
        name: clusterresourceoverride-configuration
        namespace: clusterresourceoverride-operator
        ownerReferences:
        - apiVersion: operator.autoscaling.openshift.io/v1
          blockOwnerDeletion: true
          controller: true
          kind: ClusterResourceOverride
          name: cluster
          uid: 8e62157d-8b47-43bc-bf9e-14b1cbb283ec
        resourceVersion: "102951"
        uid: 550d22e4-8238-4c34-ac74-f06ba6b4b6cb[1]
      
      $ oc get ClusterResourceOverride cluster -oyaml
      apiVersion: operator.autoscaling.openshift.io/v1
      kind: ClusterResourceOverride
      metadata:
        annotations:
          kubectl.kubernetes.io/last-applied-configuration: |
            {"apiVersion":"operator.autoscaling.openshift.io/v1","kind":"ClusterResourceOverride","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"ocp-tc01-clusterresourceoverride-config"},"name":"cluster"},"spec":{"podResourceOverride":{"spec":{"cpuRequestToLimitPercent":5,"memoryRequestToLimitPercent":5}}}}
        creationTimestamp: "2024-11-12T03:51:41Z"
        generation: 2
        labels:
          app.kubernetes.io/instance: ocp-tc01-clusterresourceoverride-config
        name: cluster
        resourceVersion: "288448"
        uid: 8e62157d-8b47-43bc-bf9e-14b1cbb283ec
      spec:
        podResourceOverride:
          spec:
            cpuRequestToLimitPercent: 5
            forceSelinuxRelabel: true   <<<<<<<<<<==========
            memoryRequestToLimitPercent: 5

      Expected results:

      For the CRO operator to reconcile the clusterresourceoverride-configuration configMap with the appropriate values.

      Additional info:

      - Deleting the clusterresourceoverride-operator doesn't make a difference: the configmap remains untouched and still with the "forceSelinuxRelabel: false" key-value pair.
      - Manually deleting the clusterresourceoverride-configuration configmap leads to it being created with the correct .data."configuration.yaml" properties and values.

              rh-ee-macao Max Cao
              rhn-support-rsandu Robert Sandu
              Paul Rozehnal Paul Rozehnal
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: