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

ClusterResourceOverride operator fails to reconcile the clusterresourceoverride-configuration configMap

XMLWordPrintable

    • Moderate
    • None
    • 0
    • PODAUTO - Sprint 266
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, if you specified the `forceSelinuxRelabel` field in a `ClusterResourceOverride` custom resource (CR), and then modified it afterwards, the change would not be reflected in the `clusterresourceoverride-configuration`config map, which is used to apply the SELinux re-labeling workaround feature. With this update, the Cluster Resource Override Operator can track the change to the `forceSelinuxRelabel` feature in order to reconcile the config map object. As a result, the config map object is correctly updated when you change the `ClusterResourceOverride` CR field. (link:https://issues.redhat.com/browse/OCPBUGS-48692[*OCPBUGS-48692*])
      Show
      * Previously, if you specified the `forceSelinuxRelabel` field in a `ClusterResourceOverride` custom resource (CR), and then modified it afterwards, the change would not be reflected in the `clusterresourceoverride-configuration`config map, which is used to apply the SELinux re-labeling workaround feature. With this update, the Cluster Resource Override Operator can track the change to the `forceSelinuxRelabel` feature in order to reconcile the config map object. As a result, the config map object is correctly updated when you change the `ClusterResourceOverride` CR field. (link: https://issues.redhat.com/browse/OCPBUGS-48692 [* OCPBUGS-48692 *])
    • Bug Fix
    • Done

      This is a clone of issue OCPBUGS-44649. The following is the description of the original issue:

      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
              openshift-crt-jira-prow OpenShift Prow Bot
              Paul Rozehnal Paul Rozehnal
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: