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

[olmv1] ClusterExtension status and message cannot reflect the real state: Too long: may not be more than 32768 bytes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.20.0
    • 4.20.0
    • OLM
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Important
    • None
    • None
    • Rejected
    • Oddish Sprint 275, Pikachu Sprint 276, Quagsire Sprint 277, Rhydon Sprint 278
    • 4
    • In Progress
    • Bug Fix
    • Hide
      ClusterExtension upgrade could fail due to oversized CRD validation status updates. When upgrading a ClusterExtension, CRD validation status updates could exceed the Kubernetes 32 KB limit, causing the update to fail with the error “Too long: may not be more than 32768 bytes.” This prevented the ClusterExtension status from being updated, leaving no status conditions or information about why the upgrade did not occur.

      This issue occurred when the crddiff library returned a large JSON diff for unhandled CRD changes.

      The problem has been resolved by truncating and summarising the diff output for unhandled scenarios, instead of including the full JSON diff. This ensures status updates remain within size limits and users receive clear, actionable error messages.
      Show
      ClusterExtension upgrade could fail due to oversized CRD validation status updates. When upgrading a ClusterExtension, CRD validation status updates could exceed the Kubernetes 32 KB limit, causing the update to fail with the error “Too long: may not be more than 32768 bytes.” This prevented the ClusterExtension status from being updated, leaving no status conditions or information about why the upgrade did not occur. This issue occurred when the crddiff library returned a large JSON diff for unhandled CRD changes. The problem has been resolved by truncating and summarising the diff output for unhandled scenarios, instead of including the full JSON diff. This ensures status updates remain within size limits and users receive clear, actionable error messages.
    • None
    • None
    • None
    • None

      Description of problem:

      The end user is unable to retrieve the ClusterExtension status because it fails to update the status and message, as shown below,

                  error updating status: ClusterExtension.olm.operatorframework.io "extension-argocd-operator" is invalid: [status.conditions[5].message: Too long: may not be more than 32768 bytes, <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]
       > controller="controller-operator-cluster-extension-controller" controllerGroup="olm.operatorframework.io" controllerKind="ClusterExtension" ClusterExtension="extension-argocd-operator" namespace="" name="extension-argocd-operator" reconcileID="4e9d0341-1aae-467d-acd5-c6c77b7476a5"

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

          4.20.0-0.nightly-2025-07-15-083124

      How reproducible:

      always    

      Steps to Reproduce:

          1. Install argocd-operator v0.4.0
      
      jiazha-mac:~ jiazha$ cat ce-argocd.yaml 
      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: argocd-operator
        namespace: test
      ---
      apiVersion: rbac.authorization.k8s.io/v1
      kind: ClusterRoleBinding
      metadata:
        name: argocd-operator-role-binding
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: ClusterRole
        name: cluster-admin
      subjects:
      - kind: ServiceAccount
        name: argocd-operator
        namespace: test
      ---
      apiVersion: olm.operatorframework.io/v1
      kind: ClusterExtension
      metadata:
        name: extension-argocd-operator
      spec:
        namespace: test
        serviceAccount:
          name: argocd-operator
        source:
          catalog:
            packageName: argocd-operator
            channels: [alpha]
            version: "v0.4.0"
            upgradeConstraintPolicy: CatalogProvided
          sourceType: Catalog
      
      jiazha-mac:~ jiazha$ oc get clusterextension -n test
      NAME                        INSTALLED BUNDLE         VERSION   INSTALLED   PROGRESSING   AGE
      extension-argocd-operator   argocd-operator.v0.4.0   0.4.0     True        True          175m
      jiazha-mac:~ jiazha$ oc get pods -n test
      NAME                                                  READY   STATUS    RESTARTS   AGE
      argocd-operator-controller-manager-6b877fdf46-4mhmm   2/2     Running   0          45m
      
      2, upgrade it to v0.5.0.
      
      jiazha-mac:~ jiazha$ oc edit clusterextension -n test extension-argocd-operator
      ...
      
      3, After a while, check its status, as we can see, there is no any updates. The message still is "desired state reached".
      
      jiazha-mac:~ jiazha$ oc get clusterextension -n test
      NAME                        INSTALLED BUNDLE         VERSION   INSTALLED   PROGRESSING   AGE
      extension-argocd-operator   argocd-operator.v0.4.0   0.4.0     True        True          178m
      
      jiazha-mac:~ jiazha$ oc get clusterextension -n test extension-argocd-operator  -o yaml
      apiVersion: olm.operatorframework.io/v1
      kind: ClusterExtension
      metadata:
        creationTimestamp: "2025-07-18T03:31:50Z"
        finalizers:
        - olm.operatorframework.io/cleanup-unpack-cache
        - olm.operatorframework.io/cleanup-contentmanager-cache
        generation: 2
        name: extension-argocd-operator
        resourceVersion: "47564"
        uid: b118907d-019b-468b-a454-45467c14802f
      spec:
        namespace: test
        serviceAccount:
          name: argocd-operator
        source:
          catalog:
            channels:
            - alpha
            packageName: argocd-operator
            upgradeConstraintPolicy: CatalogProvided
            version: v0.5.0
          sourceType: Catalog
      status:
        conditions:
        - lastTransitionTime: "2025-07-18T03:31:50Z"
          message: ""
          observedGeneration: 1
          reason: Deprecated
          status: "False"
          type: Deprecated
        - lastTransitionTime: "2025-07-18T03:31:50Z"
          message: ""
          observedGeneration: 1
          reason: Deprecated
          status: "False"
          type: PackageDeprecated
        - lastTransitionTime: "2025-07-18T03:31:50Z"
          message: ""
          observedGeneration: 1
          reason: Deprecated
          status: "False"
          type: ChannelDeprecated
        - lastTransitionTime: "2025-07-18T03:31:50Z"
          message: ""
          observedGeneration: 1
          reason: Deprecated
          status: "False"
          type: BundleDeprecated
        - lastTransitionTime: "2025-07-18T03:31:53Z"
          message: Installed bundle quay.io/openshift-community-operators/argocd-operator@sha256:640d2d298c9001dd6da8e8a6e512392bcc626d309ca20a5a328f80130878185c
            successfully
          observedGeneration: 1
          reason: Succeeded
          status: "True"
          type: Installed
        - lastTransitionTime: "2025-07-18T03:31:53Z"
          message: desired state reached
          observedGeneration: 1
          reason: Succeeded
          status: "True"
          type: Progressing
        install:
          bundle:
            name: argocd-operator.v0.4.0
            version: 0.4.0
      
      4, cehck the operator-controller logs.
          

      Actual results:

      Found it failed to update the status and message.

                  error updating status: ClusterExtension.olm.operatorframework.io "extension-argocd-operator" is invalid: [status.conditions[5].message: Too long: may not be more than 32768 bytes, <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation] > controller="controller-operator-cluster-extension-controller" controllerGroup="olm.operatorframework.io" controllerKind="ClusterExtension" ClusterExtension="extension-argocd-operator" namespace="" name="extension-argocd-operator" reconcileID="4e9d0341-1aae-467d-acd5-c6c77b7476a5"    

      Expected results:

      The status and message should be updated to reflect the actual state.

          

      Additional info:

          

              rh-ee-cmacedo Camila Macedo
              rhn-support-jiazha Jian Zhang
              None
              None
              Jian Zhang Jian Zhang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: