Failed to install or upgrade operator with warning 'clusterserviceversion is not referenced by a subscription'
Issue
-
When installing or upgrading an operator, the action fails and an event is created in the install Namespace matching the following:
I1217 04:13:56.950471 1 event.go:282] Event(v1.ObjectReference{Kind:"Namespace", Namespace:"", Name:"openshift-operators", UID:"eb27ea51-b7e0-444e-90b8-4348168cf06c", APIVersion:"v1", ResourceVersion:"66514641", FieldPath:""}): type: 'Warning' reason: 'ResolutionFailed' constraints not satisfiable: subscription openshift-gitops-operator exists, subscription openshift-gitops-operator requires redhat-operators/openshift-marketplace/stable/openshift-gitops-operator.v1.5.8, redhat-operators/openshift-marketplace/stable/openshift-gitops-operator.v1.5.8 and @existing/openshift-operators//openshift-gitops-operator.v1.5.6-0.1664915551.p originate from package openshift-gitops-operator, clusterserviceversion openshift-gitops-operator.v1.5.6-0.1664915551.p exists and is not referenced by a subscription
-
After following Knowledge-base Solution - Operator cannot be upgraded with the error "Cannot update: CatalogSource was removed" while the CatalogSource exists in OpenShift 4, the issue still persists but there is no Cluster Service Version present in the cluster.
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Operator Lifecycle Manager (OLM)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.