Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-13989

After removing default catalogsource, installed operator went into "CatalogSource not found"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • 4.12
    • OLM
    • Important
    • No
    • OPECO 237
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      After removing default catalogsource, installed operator went into CatalogSource not found"

      Version-Release number of selected component (if applicable):

       

      How reproducible:

       

      Steps to Reproduce:

      1. Install OCP cluster with version  4.12.10  or higher and install the couple of operator provided by Red Hat. 
      
      2. Take backup of default Catlogsource in namespace openshift-marketplace.
      
      # for i in `oc get catsrc --no-headers -n openshift-marketplace | awk '{print $1}'` ; do oc get catsrc -n openshift-marketplace $i -o yaml > $i.yaml; done
      
      3.  Disable the default catalogsource
      
      # oc patch OperatorHub cluster --type json -p '[{"op": "add", "path": "/spec/disableAllDefaultSources", "value": true}]' 
      # oc patch operatorhub/cluster --type=merge -p '{"spec":{"sources":[{"disabled":true,"name":"redhat-operators"}]}}' 
      
      4. Now edit the file which we took backup in 2nd step and change name of respective catalogsource for example:
      
      # vi redhat-operators.yaml
      
      name: redhat-operators     << change this name as like redhat-operators-1 . Ultimate goal is to modify each catalogsource name from default to new name.
      
      5. Once default name changed let's create custom catalog using oc create -f
      # oc create -f certified-operators.yaml
      # oc create -f community-operators.yaml
      # oc create -f redhat-marketplace.yaml
      # oc create -f redhat-operators.yaml
      
      6. verify with below commands new catalogsource and respective pod must be created.
      
      # oc get catsrc -n openshift-marketplace;oc get pods -n openshift-marketplace
      NAME                    DISPLAY               TYPE   PUBLISHER   AGE
      certified-operators-1   Certified Operators   grpc   Red Hat     86s
      community-operators-1   Community Operators   grpc   Red Hat     5m5s
      redhat-marketplace-1    Red Hat Marketplace   grpc   Red Hat     5m5s
      redhat-operators-1      Red Hat Operators     grpc   Red Hat     5m5s
      NAME                                    READY   STATUS    RESTARTS   AGE
      certified-operators-1-wfz9g             1/1     Running   0          86s
      community-operators-1-8f2js             1/1     Running   0          5m5s
      marketplace-operator-6f9748c96f-b75dz   1/1     Running   1          3d20h
      redhat-marketplace-1-mjzzr              1/1     Running   0          5m4s
      redhat-operators-1-9cbnr                1/1     Running   0          5m4s
      
      
      7. Now you will see all previously installed operator will be in "CatalogSource not found" state and you will be get multiple below type of events:
      
      Raw
      30s         Warning   ResolutionFailed      namespace/default                                            constraints not satisfiable: subscription businessautomation-operator exists, no operators found from catalog redhat-operators in namespace openshift-marketplace referenced by subscription businessautomation-operator
      27s         Warning   ResolutionFailed      namespace/default                                            constraints not satisfiable: no operators found from catalog redhat-operators in namespace openshift-marketplace referenced by subscription businessautomation-operator, subscription businessautomation-operator exists
      28s         Warning   ResolutionFailed      namespace/open-cluster-management                            constraints not satisfiable: no operators found from catalog redhat-operators in namespace openshift-marketplace referenced by subscription advanced-cluster-management, subscription advanced-cluster-management exists

       

       

      Actual results:

      all previously installed operator will be in "CatalogSource not found"

      Expected results:

      without re-installing existing operator this issue must be fixed. 

      Additional info:

       

              rh-ee-jkeister Jordan Keister
              rhn-support-bshaw Bikash Shaw
              Xia Zhao Xia Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: