Unable to remove kiali Operator stuck in Cannot update, catalogSource was removed

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4

Issue

  • Unable to remove kiali Operator
  • kiali Operator stuck in "Cannot update, catalogSource was removed" state.
  • Unable to reinstall kiali Operator
CatalogSource logs:
2022-07-01T08:50:49.727732055Z I0701 08:50:49.727680       1 event.go:282] Event(v1.ObjectReference{Kind:"Namespace", Namespace:"", Name:"openshift-operators", UID:"8687f55e-d0e7-4b24-a6d9-dee14de32282", APIVersion:"v1", ResourceVersion:"313653813", FieldPath:""}): type: 'Warning' reason: 'ResolutionFailed' constraints not satisfiable: subscription kiali-ossm requires at least one of redhat-operators/openshift-marketplace/stable/kiali-operator.v1.48.0, redhat-operators/openshift-marketplace/stable/kiali-operator.v1.36.10 or @existing/openshift-operators//kiali-operator.v1.36.9, clusterserviceversion kiali-operator.v1.36.8 exists and is not referenced by a subscription, redhat-operators/openshift-marketplace/stable/kiali-operator.v1.36.10, @existing/openshift-operators//kiali-operator.v1.36.9, redhat-operators/openshift-marketplace/stable/kiali-operator.v1.48.0 and @existing/openshift-operators//kiali-operator.v1.36.8 provide MonitoringDashboard (monitoring.kiali.io/v1alpha1), subscription kiali-ossm exists

Resolution

  • While attempting to delete the Kiali CRs and it is getting hung, that means the finalizers are still in them and that must need to be removed because it sounds like may be during the upgrade, something happened that broke the "connection" between operator and the Kiali CRs
    So here is the steps that need to follow - manually purge the finalizer from the Kiali CRs . Deleting the Kiali CR named "kiali" in the istio-system namespace.

1) Patch the finalizers with below:

$oc patch kiali kiali -n istio-system -p '{"metadata":{"finalizers": []}}' --type=merge

2) Then delete the CR.

$oc delete kiali kiali -n istio-system   (deleting CR)
$oc delete crd kialis.kiali.io        Here CRD are getting deleted  (and it will remove all Kiali CRs along with it)

3) After performing Steps 1) and 2) , Uninstall the operator from the GUI

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.

Comments