`opm index prune` only supports sqlite-based catalogs in OpenShift Container Platform 4.11
Environment
- Red Hat OpenShift Container Platform [RHOCP]
- 4.11 and above
Issue
- When creating an operator catalog using the RHOCP 4.11 tools set, the following error is generated:
Error: `opm index prune` only supports sqlite-based catalogs
Resolution
- Starting with version 4.11, only the file-based catalog is supported. Please, refer to the
oc mirrorplugin documentation for instructions on how to use this method.
Root Cause
-
In the documentation for
opm4.11 it is stated:- "The SQLite-based catalog format, including the related CLI commands, is a deprecated feature. Deprecated functionality is still included in OpenShift Container Platform and continues to be supported; however, it will be removed in a future release of this product and is not recommended for new deployments."
- "As of OpenShift Container Platform 4.11, the default Red Hat-provided Operator catalog releases in the file-based catalog format. The default Red Hat-provided Operator catalogs for OpenShift Container Platform 4.6 through 4.10 released in the deprecated SQLite database format."
- "The opm subcommands, flags, and functionality related to the SQLite database format are also deprecated and will be removed in a future release. The features are still supported and must be used for catalogs that use the deprecated SQLite database format."
Diagnostic Steps
- When creating an operator catalog, the error below is presented:
$ opm index prune \
-f registry.redhat.io/redhat/redhat-operator-index:v4.11 \
-p advanced-cluster-management,jaeger-product,quay-operator \
-t localhost:5000/redhat/redhat-operator-index:4.11
WARN[0000] DEPRECATION NOTICE:
Sqlite-based catalogs and their related subcommands are deprecated. Support for
them will be removed in a future release. Please migrate your catalog workflows
to the new file-based catalog format.
INFO[0000] pruning the index packages="[advanced-cluster-management jaeger-product quay-operator]"
INFO[0000] Pulling previous image registry.redhat.io/redhat/redhat-operator-index:v4.11 to get metadata packages="[advanced-cluster-management jaeger-product quay-operator]"
INFO[0000] running /usr/bin/podman pull registry.redhat.io/redhat/redhat-operator-index:v4.11 packages="[advanced-cluster-management jaeger-product quay-operator]"
INFO[0003] running /usr/bin/podman pull registry.redhat.io/redhat/redhat-operator-index:v4.11 packages="[advanced-cluster-management jaeger-product quay-operator]"
INFO[0005] Getting label data from previous image packages="[advanced-cluster-management jaeger-product quay-operator]"
INFO[0005] running podman inspect packages="[advanced-cluster-management jaeger-product quay-operator]"
Error: `opm index prune` only supports sqlite-based catalogs
Product(s)
Components
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.