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

[OLM v1] operator upgrade failed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • 4.15
    • OLM
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • No
    • None
    • None
    • Rejected
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      operator upgrade failed

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

      zhaoxia@xzha-mac test_upgrade % oc get clusterversion
      NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.15.0-0.nightly-2023-11-06-182702   True        False         91m     Cluster version is 4.15.0-0.nightly-2023-11-06-182702

      How reproducible:

      always

      Steps to Reproduce:

      1. create catalog
      zhaoxia@xzha-mac test_upgrade % cat catalogd-xzha.yaml 
      apiVersion: catalogd.operatorframework.io/v1alpha1
      kind: Catalog
      metadata:
        name: test-catalog-xzha
      spec:
        source:
          type: image
          image:
            ref: quay.io/olmqe/nginxolm-operator-index:catalogd-v1.0.1
      zhaoxia@xzha-mac test_upgrade % opm alpha list bundles quay.io/olmqe/nginxolm-operator-index:catalogd-v1.0.1
      PACKAGE         CHANNEL         BUNDLE                 REPLACES  SKIPS  SKIP RANGE  IMAGE
      nginx-operator  candidate-v0.0  nginx-operator.v0.0.1                               quay.io/olmqe/nginxolm-operator-bundle:v0.0.1-multi
      nginx-operator  candidate-v1.0  nginx-operator.v1.0.1                               quay.io/olmqe/nginxolm-operator-bundle:v1.0.1-multi
      
      
      2. install operator
      zhaoxia@xzha-mac test_upgrade % cat operator_1.yaml 
      apiVersion: operators.operatorframework.io/v1alpha1
      kind: Operator
      metadata:
        name: operator-xzha
      spec:
        packageName: nginx-operator
        channel: candidate-v0.0
      
      zhaoxia@xzha-mac test_upgrade % oc get operator.operators.operatorframework.io/operator-xzha -o yaml        
      ...
        installedBundleResource: quay.io/olmqe/nginxolm-operator-bundle:v0.0.1-multi
        resolvedBundleResource: quay.io/olmqe/nginxolm-operator-bundle:v0.0.1-multi
      
      
       3. modify channel to be candidate-v1.0 
      
      zhaoxia@xzha-mac test_upgrade % oc get operator.operators.operatorframework.io/operator-xzha -o yaml
      apiVersion: operators.operatorframework.io/v1alpha1
      kind: Operator
      metadata:
        annotations:
          kubectl.kubernetes.io/last-applied-configuration: |
            {"apiVersion":"operators.operatorframework.io/v1alpha1","kind":"Operator","metadata":{"annotations":{},"name":"operator-xzha"},"spec":{"channel":"candidate-v1.0","packageName":"nginx-operator"}}
        creationTimestamp: "2023-11-07T06:33:16Z"
        generation: 2
        name: operator-xzha
        resourceVersion: "99828"
        uid: 75b2c937-1cf2-426a-b58e-f551274c292d
      spec:
        channel: candidate-v1.0
        packageName: nginx-operator
        upgradeConstraintPolicy: Enforce
      status:
        conditions:
        - lastTransitionTime: "2023-11-07T06:34:57Z"
          message: 'constraints not satisfiable: installed package nginx-operator is mandatory;
            installed package nginx-operator requires at least one of test-catalog-xzha-nginx-operator-nginx-operator.v0.0.1;
            nginx-operator package uniqueness permits at most 1 of test-catalog-xzha-nginx-operator-nginx-operator.v1.0.1,
            test-catalog-xzha-nginx-operator-nginx-operator.v0.0.1; required package nginx-operator
            is mandatory; required package nginx-operator requires at least one of test-catalog-xzha-nginx-operator-nginx-operator.v1.0.1'
          observedGeneration: 2
          reason: ResolutionFailed
          status: "False"
          type: Resolved
        - lastTransitionTime: "2023-11-07T06:34:57Z"
          message: installation has not been attempted as resolution is unsatisfiable
          observedGeneration: 2
          reason: InstallationStatusUnknown
          status: Unknown
          type: Installed

      Actual results:

      operator upgrade failed with error message "constraints not satisfiable: installed package nginx-operator is mandatory;       installed package nginx-operator requires at least one of test-catalog-xzha-nginx-operator-nginx-operator.v0.0.1;       nginx-operator package uniqueness permits at most 1 of test-catalog-xzha-nginx-operator-nginx-operator.v1.0.1,       test-catalog-xzha-nginx-operator-nginx-operator.v0.0.1; required package nginx-operator       is mandatory; required package nginx-operator requires at least one of test-catalog-xzha-nginx-operator-nginx-operator.v1.0.1'"

      Expected results:

      operator upgrade success

      Additional info:

       

              agreene1991 Alexander Greene (Inactive)
              rhn-support-xzha Xia Zhao
              None
              None
              Xia Zhao Xia Zhao
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: