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

Operator CR's InstallPlan status not updated to installed when two installplans are generated by OLM and the operator is installed anyway

XMLWordPrintable

    • None
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      While installing 3672 SNOs, of the 3645 successfully installed SNOs, 2 failed (vm00529 and vm00544) to complete du profile application by ACM policies because the Operator objects for each did not contain a conditions field in the InstallPlan section for an Operator status because there was two installPlans.
      
      Example:
      # oc --kubeconfig /root/hv-vm/kc/vm00529/kubeconfig get operators local-storage-operator.openshift-local-storage -o json | jq '.status.components.refs[] | select(.kind=="InstallPlan")'
      {
        "apiVersion": "operators.coreos.com/v1alpha1",
        "kind": "InstallPlan",
        "name": "install-v9fv5",
        "namespace": "openshift-local-storage"
      }
      
      You can see there is no conditions array to determine if the installplan completed:
      # oc --kubeconfig /root/hv-vm/kc/vm00529/kubeconfig get installplans -n openshift-local-storage
      NAME            CSV                                           APPROVAL   APPROVED
      install-kpfzx   local-storage-operator.v4.16.0-202410011135   Manual     true
      install-v9fv5   local-storage-operator.v4.16.0-202410011135   Manual     false
      
      The same occurred for the second SNO however for a different operator:
      # oc --kubeconfig /root/hv-vm/kc/vm00544/kubeconfig get operators ptp-operator.openshift-ptp -o json | jq '.status.components.refs[] | select(.kind=="InstallPlan")'
      {
        "apiVersion": "operators.coreos.com/v1alpha1",
        "kind": "InstallPlan",
        "name": "install-fsbt2",
        "namespace": "openshift-ptp"
      }
      
      # oc --kubeconfig /root/hv-vm/kc/vm00544/kubeconfig get installplans -n openshift-ptp 
      NAME            CSV                                 APPROVAL   APPROVED
      install-66lft   ptp-operator.v4.16.0-202410011135   Manual     true
      install-fsbt2   ptp-operator.v4.16.0-202410011135   Manual     false
      
      
      Here is an example of a correctly installed installplan from another SNO in the testbed:
      # oc --kubeconfig /root/hv-vm/kc/vm00545/kubeconfig get operators ptp-operator.openshift-ptp -o json | jq '.status.components.refs[] | select(.kind=="InstallPlan")'
      {
        "apiVersion": "operators.coreos.com/v1alpha1",
        "conditions": [
          {
            "lastTransitionTime": "2024-10-16T00:09:04Z",
            "lastUpdateTime": "2024-10-16T00:09:04Z",
            "status": "True",
            "type": "Installed"
          }
        ],
        "kind": "InstallPlan",
        "name": "install-jsgkz",
        "namespace": "openshift-ptp"
      }
      
      
      # oc --kubeconfig /root/hv-vm/kc/vm00545/kubeconfig get installplans -n openshift-ptp 
      NAME            CSV                                 APPROVAL   APPROVED
      install-jsgkz   ptp-operator.v4.16.0-202410011135   Manual     true
      
      
      
      
      

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

      Hub and installed SNOs are both 4.17.1
      ACM - 2.12.0-DOWNSTREAM-2024-10-10-17-47-25

      How reproducible:

          

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          

      Expected results:

          

      Additional info:

          

              lmohanty@redhat.com Lalatendu Mohanty
              akrzos@redhat.com Alex Krzos
              Xia Zhao Xia Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: