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": "",
  "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

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

oc get CatalogSource odf-catalogsource -n openshift-marketplace -o json | jq .spec.image

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%";

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *