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

[OLM v1.0] Catalog wrong type parameter will block the catalog deleted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • 4.15.0
    • OLM / Registry
    • No
    • OPECO 248
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      In OLMv1:
      Catalogd 
      When a failing catalog exists(wrong pollInterval), the newly created catalog cannot be unpacked.     

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

      release-4.15 with open TP

      How reproducible:

      often    

      Steps to Reproduce:

          1.Enable TP.
      $ oc patch featuregate cluster -p '{"spec": {"featureSet": "TechPreviewNoUpgrade"}}' --type=merge
      
           2.Create a catalog with wrong pollInterval (1mm)
      jitli@RedHat:~$ cat catalog-redhat-wrongtype.yaml 
      apiVersion: catalogd.operatorframework.io/v1alpha1
      kind: Catalog
      metadata:
        name: redhat-operators-wrongtype
      spec:
        source:
          image:
            ref: quay.io/olmqe/olmtest-operator-index:nginxolm69124
          type: jitli
      
      jitli@RedHat:~$ oc create -f catalog-redhat-wrongtype.yaml
      catalog.catalogd.operatorframework.io/redhat-operators-wrongtype created jitli@RedHat:~/work/src/test/catalogd/69123$ oc get catalog
      NAME                         PHASE      AGE
      redhat-operators-wrongtype   Failing    28s
       jitli@RedHat:~$ oc get catalog redhat-operators-wrongtype -o yaml 
      apiVersion: catalogd.operatorframework.io/v1alpha1
      kind: Catalog
      metadata:
        creationTimestamp: "2023-12-28T09:45:36Z"
        finalizers:
        - catalogd.operatorframework.io/delete-server-cache
        generation: 1
        name: redhat-operators-wrongtype
        resourceVersion: "277176"
        uid: 3ce5b4a3-b17c-489e-a32d-8504bb6d4b6a
      spec:
        source:
          image:
            ref: quay.io/olmqe/olmtest-operator-index:nginxolm69124
          type: jitli
      status:
        conditions:
        - lastTransitionTime: "2023-12-28T09:45:36Z"
          message: 'source bundle content: source type "jitli" not supported'
          reason: UnpackFailed
          status: "False"
          type: Unpacked
        phase: Failing 
           3. then delete the catalog 
      jitli@RedHat:~/work/src/test/catalogd$ oc delete catalog redhat-operators-wrongtype
      catalog.catalogd.operatorframework.io "redhat-operators-wrongtype" deleted
      ^Z
      [10]+  Stopped                 oc delete catalog redhat-operators-wrongtype

      Will stuck ...

      jitli@RedHat:~/work/src/test/catalogd$ oc get catalog redhat-operators-wrongtype -o yaml
      apiVersion: catalogd.operatorframework.io/v1alpha1
      kind: Catalog
      metadata:
        creationTimestamp: "2023-12-28T09:45:36Z"
        deletionGracePeriodSeconds: 0
        deletionTimestamp: "2023-12-28T09:47:57Z"
        finalizers:
        - catalogd.operatorframework.io/delete-server-cache
        generation: 2
        name: redhat-operators-wrongtype
        resourceVersion: "278310"
        uid: 3ce5b4a3-b17c-489e-a32d-8504bb6d4b6a
      spec:
        source:
          image:
            ref: quay.io/olmqe/olmtest-operator-index:nginxolm69124
          type: jitli
      status:
        conditions:
        - lastTransitionTime: "2023-12-28T09:45:36Z"
          message: 'source bundle content: source type "jitli" not supported'
          reason: UnpackFailed
          status: "False"
          type: Unpacked
        - lastTransitionTime: "2023-12-28T09:47:57Z"
          message: 'failed to delete storage: source type "jitli" not supported'
          reason: FailedToDelete
          status: "False"
          type: Delete
        phase: Failing 

      Actual results:

       

        message: 'failed to delete storage: source type "jitli" not supported'     reason: FailedToDelete

      Expected results:

      deleted

      or check and reject when creating with wrong format

      jitli@RedHat:~$ oc create -f catalog-redhat.yaml 
      The Catalog "redhatT-operators-jitli" is invalid: metadata.name: Invalid value: "redhatT-operators-jitli": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') 

      Additional info:

       

            rh-ee-bpalmer Bryce Palmer
            rhn-support-jitli Keenon Lee
            Keenon Lee Keenon Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: