OpenShift – Troubleshooting Operator Installation Failure

I tried to install ODF (OpenShift Data Foundation) 4.10 (which is still in dev at that moment) on clean installation of OpenShift 4.10, but for some reason, one of the operators which came bundled with it didn’t successfully installed. This small guide documents the process I took to debug and resolve the problem.

ODF Failed to Finish

In the events log for the operator installation I got this message,

subscription odf-csi-addons-operator exists, no operators found in package odf-csi-addons-operator in the catalog referenced by subscription odf-csi-addons-operator

If an operator installation failed, first look on the Subscription, and see if an `InstallPlan` was created.

$ oc get Subscription -n openshift-storage
NAME                                                               PACKAGE                   SOURCE              CHANNEL
mcg-operator-stable-4.10-odf-catalogsource-openshift-marketplace   mcg-operator              odf-catalogsource   stable-4.10
ocs-operator-stable-4.10-odf-catalogsource-openshift-marketplace   ocs-operator              odf-catalogsource   stable-4.10
odf-csi-addons-operator                                            odf-csi-addons-operator   redhat-operators    stable-4.10
odf-operator                                                       odf-operator              odf-catalogsource   stable-4.10

e.g if we look on the `odf-operator`, we can see there is a InstallPlan for it

$ oc get Subscription odf-operator -n openshift-storage -o json | jq .status.installplan
{
  "apiVersion": "operators.coreos.com/v1alpha1",
  "kind": "InstallPlan",
  "name": "install-q2ktt",
  "uuid": "744779c2-ff45-464d-b3f6-31c424c29137"
}

But for the `odf-csi-addons-operator` we have none,

$ oc get Subscription odf-csi-addons-operator -n openshift-storage -o json | jq .status.installplan
null

In the above example, an `InstallPlan` was not created for `odf-csi-addons-operator`, in that case we will examine the `CatalogSource` and if the index image which used by it point to this package.

In the above example we see that the `CatalogSource` for `odf-csi-addons-operator` is `redhat-operators` unlike the others which are `odf-catalogsource`.

Extracting the index image name from the catalog, and looking for the package name in it,

oc get CatalogSource redhat-operators -n openshift-marketplace -o json | jq .spec.image
"registry.redhat.io/redhat/redhat-operator-index:v4.10"

oc get CatalogSource odf-catalogsource -n openshift-marketplace -o json | jq .spec.image
"quay.io/rhceph-dev/ocs-registry:latest-stable-4.10"

We can investigate deeply by pulling the DB from the image, and looking which bundles are in it.

$ oc image extract <index_image_pullspec> --file /database/index.db
$ sqlite3 index.db
sqlite> select name from operatorbundle where name like "odf%";
odf-compose-operator.v4.10.0
odf-csi-addons-operator.v4.10.0
odf-lvm-operator.v4.10.0
odf-multicluster-orchestrator.v4.10.0
odf-multicluster-orchestrator.v4.9.0
odf-multicluster-orchestrator.v4.9.1
odf-operator.v4.10.0
odf-operator.v4.9.0
odf-operator.v4.9.1

You may also like...

Leave a Reply

Your email address will not be published.