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

OLM does not upgrade Subscriptions from a custom catalog without manual intervention

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • 4.16
    • OLM
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Critical
    • None
    • None
    • None
    • Rejected
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      Every time cu upgrades egress-operator, they have to delete the Subscription, delete the CSV, then recreate the Subscription. Only then it takes the proper version.   

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

          egress-operator.v1.1.9

      How reproducible:

          

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          Every time we do a new release of an operator we have to perform the following steps:
      
      Get the Subscription - notice how it does not even attempt to install the newer version:
      ```
      $ oc get subs egress-operator -o yaml
      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
      annotations:
       kubectl.kubernetes.io/last-applied-configuration: |
         {"apiVersion":"operators.coreos.com/v1alpha1","kind":"Subscription","metadata":{"annotations":{"syncsetgenerator.kosmos.fis.dev/name":"stage-eu-central-1-rg8mt","syncsetgenerator.kosmos.fis.dev/path":"features/egress/namespaces/egress-operator/subscription-egress-operator.yaml","syncsetgenerator.kosmos.fis.dev/revision":"v1.238.0@sha1:a82f078d595d87afbdfc223ff5449028aefccaf7"},"labels":{"hive.openshift.io/managed":"true"},"name":"egress-operator","namespace":"egress-operator"},"spec":{"channel":"fast-v2","config":{"resources":{"limits":{"cpu":"200m","memory":"1Gi"},"requests":{"cpu":"200m","memory":"800Mi"}}},"name":"egress-operator","source":"sophos-catalog","sourceNamespace":"openshift-marketplace"}}
       syncsetgenerator.kosmos.fis.dev/name: stage-eu-central-1-rg8mt
       syncsetgenerator.kosmos.fis.dev/path: features/egress/namespaces/egress-operator/subscription-egress-operator.yaml
       syncsetgenerator.kosmos.fis.dev/revision: v1.238.0@sha1:a82f078d595d87afbdfc223ff5449028aefccaf7
      creationTimestamp: "2022-04-26T10:11:40Z"
      generation: 4
      labels:
       hive.openshift.io/managed: "true"
       operators.coreos.com/egress-operator.egress-operator: ""
      name: egress-operator
      namespace: egress-operator
      resourceVersion: "2501668265"
      uid: 6f341a74-0095-4fb2-9396-fef85e8ee2eb
      spec:
      channel: fast-v2
      config:
       resources:
         limits: cpu: 200m
       memory: 1Gi   requests: cpu: 200m
       memory: 800Miname: egress-operator
      source: sophos-catalog
      sourceNamespace: openshift-marketplace
      status:
      catalogHealth:
      
      
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: certified-operators
        namespace: openshift-marketplace
        resourceVersion: "1595632045"
        uid: 85181e4a-e870-4915-94bc-7cf8badeab06
      healthy: true
      lastUpdated: "2024-03-06T16:55:28Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: community-operators
        namespace: openshift-marketplace
        resourceVersion: "1595631848"
        uid: 9987f576-b9c6-43ae-ad44-979af33843e7
      healthy: true
      lastUpdated: "2024-03-06T16:55:28Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: operatorhubio
        namespace: openshift-marketplace
        resourceVersion: "1595631671"
        uid: bff8d86e-f6a3-4a34-bb48-967a809bb591
      healthy: true
      lastUpdated: "2024-03-06T16:55:28Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: redhat-marketplace
        namespace: openshift-marketplace
        resourceVersion: "1595631893"
        uid: 02c0aade-4459-44e4-8fe1-b543c4b8ee62
      healthy: true
      lastUpdated: "2024-03-06T16:55:28Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: redhat-operators
        namespace: openshift-marketplace
        resourceVersion: "1595631814"
        uid: d5fa45f4-896c-40a2-9208-4fcfb1ff1fa7
      healthy: true
      lastUpdated: "2024-03-06T16:55:28Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: sophos-catalog
        namespace: openshift-marketplace
        resourceVersion: "1595631822"
        uid: b2819807-6f7c-409c-9006-2ada07c96351
      healthy: true
      lastUpdated: "2024-03-06T16:55:28Z"
      conditions:
      lastTransitionTime: "2024-03-06T16:55:28Z"
      message: all available catalogsources are healthy
      reason: AllCatalogSourcesHealthy
      status: "False"
      type: CatalogSourcesUnhealthy
      currentCSV: egress-operator.v1.1.9
      installPlanGeneration: 14
      installPlanRef:
      apiVersion: operators.coreos.com/v1alpha1
      kind: InstallPlan
      name: install-55qpd
      namespace: egress-operator
      resourceVersion: "2254478103"
      uid: 26f4db5e-8f6c-42d2-bcdb-c3519020761e
      installedCSV: egress-operator.v1.1.9
      installplan:
      apiVersion: operators.coreos.com/v1alpha1
      kind: InstallPlan
      name: install-55qpd
      uuid: 26f4db5e-8f6c-42d2-bcdb-c3519020761e
      lastUpdated: "2025-04-30T16:04:10Z"
      state: AtLatestKnownThe proper channels are available:oc get packagemanifest -n openshift-marketplace egress-operator -o yaml | yq '.status.channels[].name'
      candidate-v1
      candidate-v1.1
      candidate-v2
      candidate-v2.0
      fast-v1
      fast-v1.1
      fast-v2
      fast-v2.0
      stable-v1
      stable-v1.1
      stable-v2
      stable-v2.0We then have to delete the Subscription, delete the CSV, then recreate the Subscription. This time it gets the correct version:apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
      annotations:
      kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"operators.coreos.com/v1alpha1","kind":"Subscription","metadata":{"annotations":{"syncsetgenerator.kosmos.fis.dev/name":"stage-eu-central-1-rg8mt","syncsetgenerator.kosmos.fis.dev/path":"features/egress/namespaces/egress-operator/subscription-egress-operator.yaml","syncsetgenerator.kosmos.fis.dev/revision":"v1.238.0@sha1:a82f078d595d87afbdfc223ff5449028aefccaf7"},"creationTimestamp":"2022-04-26T10:11:40Z","generation":4,"labels":{"hive.openshift.io/managed":"true","operators.coreos.com/egress-operator.egress-operator":""},"name":"egress-operator","namespace":"egress-operator","resourceVersion":"2501668265","uid":"6f341a74-0095-4fb2-9396-fef85e8ee2eb"},"spec":{"channel":"fast-v2","config":{"resources":{"limits":{"cpu":"200m","memory":"1Gi"},"requests":{"cpu":"200m","memory":"800Mi"}}},"name":"egress-operator","source":"sophos-catalog","sourceNamespace":"openshift-marketplace"},"status":{"catalogHealth":[{"catalogSourceRef":{"apiVersion":"operators.coreos.com/v1alpha1","kind":"CatalogSource","name":"certified-operators","namespace":"openshift-marketplace","resourceVersion":"1595632045","uid":"85181e4a-e870-4915-94bc-7cf8badeab06"},"healthy":true,"lastUpdated":"2024-03-06T16:55:28Z"},{"catalogSourceRef":{"apiVersion":"operators.coreos.com/v1alpha1","kind":"CatalogSource","name":"community-operators","namespace":"openshift-marketplace","resourceVersion":"1595631848","uid":"9987f576-b9c6-43ae-ad44-979af33843e7"},"healthy":true,"lastUpdated":"2024-03-06T16:55:28Z"},{"catalogSourceRef":{"apiVersion":"operators.coreos.com/v1alpha1","kind":"CatalogSource","name":"operatorhubio","namespace":"openshift-marketplace","resourceVersion":"1595631671","uid":"bff8d86e-f6a3-4a34-bb48-967a809bb591"},"healthy":true,"lastUpdated":"2024-03-06T16:55:28Z"},{"catalogSourceRef":{"apiVersion":"operators.coreos.com/v1alpha1","kind":"CatalogSource","name":"redhat-marketplace","namespace":"openshift-marketplace","resourceVersion":"1595631893","uid":"02c0aade-4459-44e4-8fe1-b543c4b8ee62"},"healthy":true,"lastUpdated":"2024-03-06T16:55:28Z"},{"catalogSourceRef":{"apiVersion":"operators.coreos.com/v1alpha1","kind":"CatalogSource","name":"redhat-operators","namespace":"openshift-marketplace","resourceVersion":"1595631814","uid":"d5fa45f4-896c-40a2-9208-4fcfb1ff1fa7"},"healthy":true,"lastUpdated":"2024-03-06T16:55:28Z"},{"catalogSourceRef":{"apiVersion":"operators.coreos.com/v1alpha1","kind":"CatalogSource","name":"sophos-catalog","namespace":"openshift-marketplace","resourceVersion":"1595631822","uid":"b2819807-6f7c-409c-9006-2ada07c96351"},"healthy":true,"lastUpdated":"2024-03-06T16:55:28Z"}],"conditions":[{"lastTransitionTime":"2024-03-06T16:55:28Z","message":"all available catalogsources are healthy","reason":"AllCatalogSourcesHealthy","status":"False","type":"CatalogSourcesUnhealthy"}],"currentCSV":"egress-operator.v1.1.9","installPlanGeneration":14,"installPlanRef":{"apiVersion":"operators.coreos.com/v1alpha1","kind":"InstallPlan","name":"install-55qpd","namespace":"egress-operator","resourceVersion":"2254478103","uid":"26f4db5e-8f6c-42d2-bcdb-c3519020761e"},"installedCSV":"egress-operator.v1.1.9","installplan":{"apiVersion":"operators.coreos.com/v1alpha1","kind":"InstallPlan","name":"install-55qpd","uuid":"26f4db5e-8f6c-42d2-bcdb-c3519020761e"},"lastUpdated":"2025-04-30T16:04:10Z","state":"AtLatestKnown"}}
      syncsetgenerator.kosmos.fis.dev/name: stage-eu-central-1-rg8mt
      syncsetgenerator.kosmos.fis.dev/path: features/egress/namespaces/egress-operator/subscription-egress-operator.yaml
      syncsetgenerator.kosmos.fis.dev/revision: v1.238.0@sha1:a82f078d595d87afbdfc223ff5449028aefccaf7
      creationTimestamp: "2025-06-04T17:37:28Z"
      generation: 1
      labels:
      hive.openshift.io/managed: "true"
      operators.coreos.com/egress-operator.egress-operator: ""
      name: egress-operator
      namespace: egress-operator
      resourceVersion: "2501765903"
      uid: f76cdc7b-fb75-40c3-ab26-f2673ed3192d
      spec:
      channel: fast-v2
      config:
      resources:
        limits:cpu: 200m
      memory: 1Gi  requests:cpu: 200m
      memory: 800Miname: egress-operator
      source: sophos-catalog
      sourceNamespace: openshift-marketplace
      status:
      catalogHealth:
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: certified-operators
        namespace: openshift-marketplace
        resourceVersion: "2501762945"
        uid: 85181e4a-e870-4915-94bc-7cf8badeab06
      healthy: true
      lastUpdated: "2025-06-04T17:37:30Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: community-operators
        namespace: openshift-marketplace
        resourceVersion: "2501747195"
        uid: 9987f576-b9c6-43ae-ad44-979af33843e7
      healthy: true
      lastUpdated: "2025-06-04T17:37:30Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: operatorhubio
        namespace: openshift-marketplace
        resourceVersion: "2501757918"
        uid: bff8d86e-f6a3-4a34-bb48-967a809bb591
      healthy: true
      lastUpdated: "2025-06-04T17:37:30Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: redhat-marketplace
        namespace: openshift-marketplace
        resourceVersion: "2501751990"
        uid: 02c0aade-4459-44e4-8fe1-b543c4b8ee62
      healthy: true
      lastUpdated: "2025-06-04T17:37:30Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: redhat-operators
        namespace: openshift-marketplace
        resourceVersion: "2501761166"
        uid: d5fa45f4-896c-40a2-9208-4fcfb1ff1fa7
      healthy: true
      lastUpdated: "2025-06-04T17:37:30Z"
      catalogSourceRef:
        apiVersion: operators.coreos.com/v1alpha1
        kind: CatalogSource
        name: sophos-catalog
        namespace: openshift-marketplace
        resourceVersion: "2501760925"
        uid: b2819807-6f7c-409c-9006-2ada07c96351
      healthy: true
      lastUpdated: "2025-06-04T17:37:30Z"
      conditions:
      lastTransitionTime: "2025-06-04T17:37:36Z"
      message: all available catalogsources are healthy
      reason: AllCatalogSourcesHealthy
      status: "False"
      type: CatalogSourcesUnhealthy
      currentCSV: egress-operator.v2.0.1
      installPlanGeneration: 1
      installPlanRef:
      apiVersion: operators.coreos.com/v1alpha1
      kind: InstallPlan
      name: install-rqvmp
      namespace: egress-operator
      resourceVersion: "2501764959"
      uid: 1f16dfad-c7c1-4190-9ed4-d791000d5463
      installedCSV: egress-operator.v2.0.1
      installplan:
      apiVersion: operators.coreos.com/v1alpha1
      kind: InstallPlan
      name: install-rqvmp
      uuid: 1f16dfad-c7c1-4190-9ed4-d791000d5463
      lastUpdated: "2025-06-04T17:39:39Z"
      state: AtLatestKnown

      Expected results:

          We should not have to delete CSV and recreate the subscription and the operator should show up the desired version automatically after upgrade

      Additional info:

          

              rh-ee-cchantse Catherine Chan-Tse
              rhn-support-eruby Esther Ruby R
              None
              None
              Jian Zhang Jian Zhang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: