Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-20500

OperatorPolicy fails to approve InstallPlan containing multiple CSVs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • ACM 2.15.0
    • ACM 2.13.0
    • GRC
    • Quality / Stability / Reliability
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • GRC Sprint 2025-14, GRC Sprint 2025-15, GRC Sprint 2025-16, GRC Sprint 2025-17
    • ?
    • None

      Description of problem:

      Trying to install an Operator, that brings another one should work with this policy:

             apiVersion: policy.open-cluster-management.io/v1beta1
              kind: OperatorPolicy
              metadata:
                name: mtc-operator
              spec:
                remediationAction: enforce
                complianceType: musthave
                severity: medium
                operatorGroup:
                  name: mtc-operator
                  namespace: openshift-migration
                  targetNamespaces:
                    - openshift-migration
                subscription:
                  channel: release-v1.8
                  name: mtc-operator
                  namespace: openshift-migration
                  source: redhat-operators
                  sourceNamespace: openshift-marketplace
                  startingCSV: mtc-operator.v1.8.5
                upgradeApproval: Automatic
                versions:
                  - mtc-operator.v1.8.5
      

      The Migration Toolkit for Containers operator has a dependency to OADP in the installPlan. With https://issues.redhat.com/browse/ACM-14540 it should approve the CSV for OADP as well but following NonCompliant message is shown

      NonCompliant; the policy spec is valid, the OperatorGroup matches what is required by the policy, the Subscription matches what is required by the policy, an InstallPlan to update to [mtc-operator.v1.8.5, oadp-operator.v1.4.4] is available for approval but approval for [oadp-operator.v1.4.4] is required, the ClusterServiceVersion required by the policy was not found, no CRDs were found for the operator, there are no relevant deployments because the ClusterServiceVersion is missing, CatalogSource was found
      

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

      2.13

      How reproducible:

      Try to create OperatorPolicy as above

      Steps to Reproduce:

      1. Create OperatorPolicy, Placements etc for Migration Toolkit for Containers Operator
      2. See NonCompliance result
      3. ...

      Actual results:

      Policy is uncompliant and operator is not installed completely.

      Expected results:

      Policy shoulb be compliant and both MTC and OADP should be installed

      Additional info:

      It seems like there is an inaccurate assumption when trying to calculate the dependencies. In the InstallPlan, mtc-operator.v1.8.5 specifies a dependency on packageName: "redhat-oadp-operator" . We assumed that the identifier for that thing would start with that packageName, but it's actually resolved as oadp-operator.v1.4.4 (missing the redhat- part).

              jalaw@redhat.com Janelle Law
              rhn-support-afaulhab Anne Faulhaber
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: