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

Upgrading to compliance-operator.v0.1.61 from compliance-operator.v0.1.53 fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • 4.10
    • Compliance Operator
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • No
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      When upgrading to compliance-operator.v0.1.61 from compliance-operator.v0.1.53, the operator upgrade doesn't complete.

      The `oc get csv `command shows that the old CSV is in the Replacing state and the new CSV is in the Pending state.

      NAME                              DISPLAY                  VERSION            REPLACES                       PHASE
      compliance-operator.v0.1.53       Compliance Operator      0.1.53             compliance-operator.v0.1.49    Replacing
      compliance-operator.v0.1.61       Compliance Operator      0.1.61             compliance-operator.v0.1.53    Pending

      I can see that the compliance-operator.v0.1.61 CSV has the following error in its status:

        lastTransitionTime: "2023-07-04T13:55:59Z"
        lastUpdateTime: "2023-07-04T13:56:00Z"
        message: one or more requirements couldn't be found
        phase: Pending
        reason: RequirementsNotMet
      

      Then under `.status.requirementStatus` I can see several errors relating to Service Accounts and CRDs

      Here is an example of the error relating to the CRDs:

        - group: apiextensions.k8s.io
          kind: CustomResourceDefinition
          message: 'CRD installed alongside other CSV(s): compliance-operator.v0.1.53'
          name: complianceremediations.compliance.openshift.io
          status: PresentNotSatisfied
          version: v1
      

      And here's an example of the error relating to the Service Accounts:

        - group: ""
          kind: ServiceAccount
          message: Service account is owned by another ClusterServiceVersion
          name: api-resource-collector
          status: PresentNotSatisfied
          version: v1

      Meanwhile, the `compliance-operator` Subscription shows the following error because of the duplicate CSVs.

      constraints not satisfiable: subscription compliance-operator requires @existing/openshift-compliance//compliance-operator.v0.1.61, subscription compliance-operator exists, clusterserviceversion compliance-operator.v0.1.53 exists and is not referenced by a subscription, @existing/openshift-compliance//compliance-operator.v0.1.53 and @existing/openshift-compliance//compliance-operator.v0.1.61 provide ComplianceCheckResult (compliance.openshift.io/v1alpha1)

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

      Compliance-operator-v0.1.53, Compliance-operator-v0.1.61
      Initial issue was observed on a OpenShift 4.10.55 cluster, however I believe other OpenShift versions are affected as well.

      Actual results:

      Operator upgrade hangs and both CSVs exist

      Expected results:

      The new CSV compliance-operator v0.1.61 is successfully installed in place of compliance-operator v0.1.53.

              lbragsta@redhat.com Lance Bragstad
              rhn-support-cuthayak Clark Uthayakumar
              None
              None
              Xiaojie Yuan Xiaojie Yuan
              None
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: