Operator shows Pending status in a namespace - OLM known issue

An operator fails to install and continuously shows Pending status in a namespace.

Symptom

You can view the operator status on your OpenShift cluster console.

  1. From the navigation pane, click Operators > Installed Operators.

  2. From the Projects drop-down list, select the namespace where IBM Cloud Pak foundational services are installed.

  3. The failed operator continuously shows Pending status.

Cause

This is a known issue in the Operator Lifecycle Manager (OLM).

When the OLM fails to install an operator, the installPlan fails or is hanging and it blocks the installation.

Resolving the problem

Complete the following steps to resolve the issue:

If the operator that is causing the error is either IBM NamespaceScope Operator or Operand Deployment Lifecycle Manager (ODLM):

  1. From your OpenShift console, uninstall the Pending operator.

    1. From the navigation pane, click Operators > Installed Operators.
    2. For the operator with Pending status, click the overflow menu icon and click Uninstall.

    (Or)

    Delete the subscription and CSV of the operator by using the oc CLI.

    1. Log in to the cluster by using the oc login command.
    2. Run the following commands to delete the subscription and CSV:
      oc -n ibm-common-services delete sub <pending-operator-sub>
      oc -n ibm-common-services delete csv <pending-operator-csv>
      
  2. Delete ibm-common-service-operator pod

     oc delete pod <ibm-common-service-operator-pod-name> -n ibm-common-services
    

If the error is caused by other operator:

  1. From your OpenShift console, uninstall the Pending operator.

    1. From the navigation pane, click Operators > Installed Operators.
    2. For the operator with Pending status, click the overflow menu icon and click Uninstall.

    (Or)

    Delete the subscription and CSV of the operator by using the oc CLI.

    1. Log in to the cluster by using the oc login command.
    2. Run the following commands to delete the subscription and CSV:
      oc -n ibm-common-services delete sub <pending-operator-sub>
      oc -n ibm-common-services delete csv <pending-operator-csv>
      
  2. Delete the Operand Deployment Lifecycle Manager pod.

     oc delete pod <operand-deployment-lifecycle-manager-pod-name> -n ibm-common-services
    

After the Operand Deployment Lifecycle Manager pod is restarted, the operator successfully upgrades or reinstalls.