OLM known issue: ResolutionFailed message

The IBM Cloud Pak foundational services operator subscription status is not updated after the ClusterServiceVersion (CSV) status changes to Succeeded.

Symptom

The foundational services operator is running. However, when you check the operator subscription by using the command-line interface (CLI), you see that the subscription does not have the .status.installedCSV field.

On the Red Hat® OpenShift® cluster console, the foundational services operator CSV shows the Cannot update: CatalogSource was removed status. However, the CatalogSource exists in the cluster. Similarly, the operator Subscription exists in the cluster, but shows the Unknown failure status.

You also see error message similar to following one in the operator subscription status:

- message: >-
        constraints not satisfiable: subscription
        operand-deployment-lifecycle-manager-app exists, clusterserviceversion
        operand-deployment-lifecycle-manager.v4.0.0 exists and is not referenced
        by a subscription,
        @existing/cloudpak-control-2//operand-deployment-lifecycle-manager.v4.0.0
        and
        opencloud-operators/openshift-marketplace/v4.0/operand-deployment-lifecycle-manager.v4.0.0
        provide OperandRequest (operator.ibm.com/v1alpha1), subscription
        operand-deployment-lifecycle-manager-app requires
        opencloud-operators/openshift-marketplace/v4.0/operand-deployment-lifecycle-manager.v4.0.0
      reason: ConstraintsNotSatisfiable
      status: 'True'
      type: ResolutionFailed

Error message similar to following one can be seen in the logs of the catalog-operator pod, which is in openshift-operator-lifecycle-manager namespace:

$ oc -n openshift-operator-lifecycle-manager logs $(oc get pods -l app=catalog-operator -o NAME -n openshift-operator-lifecycle-manager ) |grep "'ResolutionFailed' constraints not satisfiable"

...
type: 'Warning' reason: 'ResolutionFailed' constraints not satisfiable: subscription operand-deployment-lifecycle-manager-app requires opencloud-operators/openshift-marketplace/v4.0/operand-deployment-lifecycle-manager.v4.0.0, opencloud-operators/openshift-marketplace/v4.0/operand-deployment-lifecycle-manager.v4.0.0 and @existing/cloudpak-control-2//operand-deployment-lifecycle-manager.v4.0.0 originate from package ibm-odlm, clusterserviceversion operand-deployment-lifecycle-manager.v4.0.0 exists and is not referenced by a subscription, subscription operand-deployment-lifecycle-manager-app exists
...

Cause

Operator Lifecycle Manager (OLM) fails to update the subscription status when the CSV status changes.

In majority of the cases, this issue is related to the subscriptions and CSVs creating requirements that cannot be satisfied by the resolver.

For more information, see GitHub issue and Red Hat OpenShift issue.

Resolution

For more information about how to resolve the issue, see the following topics:

Complete the following steps to resolve the issue:

  1. Restart the catalog-operator pod in the openshift-operator-lifecycle-manager namespace. This step resolves the issue in most cases.

     oc -n openshift-operator-lifecycle-manager delete $(oc get pods  -l app=catalog-operator -o NAME -n openshift-operator-lifecycle-manager)
    
  2. If the issue is still not resolved, check the subscription in the OpenShift console to know which operator has the Unknown failure status. Or, from the CLI, check the subscription description.

     oc describe subscription -n <operator-namespace> | grep "constraints not satisfiable"
    

    You might see a message similar to the following message:

     Message:               constraints not satisfiable: clusterserviceversion operand-deployment-lifecycle-manager.v4.0.0 exists and is not referenced by a subscription, @existing/cloudpak-control-2//operand-deployment-lifecycle-manager.v4.0.0 and opencloud-operators/openshift-marketplace/v4.0/operand-deployment-lifecycle-manager.v4.0.0 provide OperandRequest (operator.ibm.com/v1alpha1), subscription operand-deployment-lifecycle-manager-app exists, subscription operand-deployment-lifecycle-manager-app requires opencloud-operators/openshift-marketplace/v4.0/operand-deployment-lifecycle-manager.v4.0.0
    
  3. Get the CSVs of the subscriptions that show the constraints not satisfiable error. In the example message in the prior step, see the operand-deployment-lifecycle-manager.v4.0.0 information.

     oc get csv -n <operator-namespace> | grep '<name-of-the-corresponding-CSV>'
    
  4. Delete the CSV that you got in the previous step.

    oc delete csv <name-of-the-corresponding-CSV> -n <operator-namespace>
    
  5. Repeat the steps from the check the subscription step until no more constraints not satisfiable error is seen in the subscription.

After the constraints not satisfiable error is gone, OLM re-creates the CSV that you deleted.