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

"operator-sdk run bundle" generates 2 install plans, operator-sdk run bundle-upgrade failed

XMLWordPrintable

    • Important
    • None
    • OPECO 233
    • 1
    • Rejected
    • Unspecified
    • If docs needed, set a value

      Description of problem:
      "operator-sdk run bundle" generates 2 install plans

      Version-Release number of selected component (if applicable):
      zhaoxia@xzha-mac operator-framework % operator-sdk version
      operator-sdk version: "v1.22.0-ocp", commit: "23a982b81ba064596508510748bb8bb6eea19a4b", kubernetes version: "v1.24.1", go version: "go1.18.3", GOOS: "darwin", GOARCH: "amd64"
      z

      How reproducible:
      not always

      Steps to Reproduce:
      1. new a project
      oc new-project e2e-test-default-czzbg

      2. operator-sdk run bundle quay.io/olmqe/kubeturbo-bundle:v8.4.0
      zhaoxia@xzha-mac operator-framework % operator-sdk run bundle quay.io/olmqe/kubeturbo-bundle:v8.4.0
      INFO[0033] Creating a File-Based Catalog of the bundle "quay.io/olmqe/kubeturbo-bundle:v8.4.0"
      INFO[0037] Generated a valid File-Based Catalog
      INFO[0049] Created registry pod: quay-io-olmqe-kubeturbo-bundle-v8-4-0
      INFO[0050] Created CatalogSource: kubeturbo-catalog
      INFO[0050] OperatorGroup "operator-sdk-og" created
      INFO[0051] Created Subscription: kubeturbo-operator-v8-4-0-sub
      INFO[0069] Approved InstallPlan install-2pdq2 for the Subscription: kubeturbo-operator-v8-4-0-sub
      INFO[0069] Waiting for ClusterServiceVersion "e2e-test-default-czzbg/kubeturbo-operator.v8.4.0" to reach 'Succeeded' phase
      INFO[0069] Waiting for ClusterServiceVersion "e2e-test-default-czzbg/kubeturbo-operator.v8.4.0" to appear
      INFO[0103] Found ClusterServiceVersion "e2e-test-default-czzbg/kubeturbo-operator.v8.4.0" phase: Pending
      INFO[0104] Found ClusterServiceVersion "e2e-test-default-czzbg/kubeturbo-operator.v8.4.0" phase: Installing
      ...

      3. check install plan
      zhaoxia@xzha-mac ~ % oc get ip
      NAME CSV APPROVAL APPROVED
      install-2pdq2 kubeturbo-operator.v8.4.0 Manual true
      install-nvwb5 kubeturbo-operator.v8.4.0 Manual false

      zhaoxia@xzha-mac ~ % oc get sub
      NAME PACKAGE SOURCE CHANNEL
      kubeturbo-operator-v8-4-0-sub kubeturbo kubeturbo-catalog stable
      zhaoxia@xzha-mac ~ % oc get sub -o yaml
      ...
      installPlanGeneration: 1
      installPlanRef:
      apiVersion: operators.coreos.com/v1alpha1
      kind: InstallPlan
      name: install-nvwb5
      namespace: e2e-test-default-czzbg
      resourceVersion: "203502"
      uid: 39f4ef9c-89a5-48e2-9d59-856298c4a737
      installedCSV: kubeturbo-operator.v8.4.0
      installplan:
      apiVersion: operators.coreos.com/v1alpha1
      kind: InstallPlan
      name: install-nvwb5
      uuid: 39f4ef9c-89a5-48e2-9d59-856298c4a737
      lastUpdated: "2022-07-15T07:27:34Z"
      state: AtLatestKnown
      zhaoxia@xzha-mac ~ % oc get csv
      NAME DISPLAY VERSION REPLACES PHASE
      kubeturbo-operator.v8.4.0 Kubeturbo Operator 8.4.0 Succeeded

      4, operator-sdk run bundle-upgrade quay.io/olmqe/kubeturbo-bundle:v8.5.0
      INFO[0006] Found existing subscription with name kubeturbo-operator-v8-4-0-sub and namespace e2e-test-default-czzbg
      INFO[0007] Found existing catalog source with name kubeturbo-catalog and namespace e2e-test-default-czzbg
      INFO[0027] Generated a valid Upgraded File-Based Catalog
      INFO[0043] Created registry pod: quay-io-olmqe-kubeturbo-bundle-v8-5-0
      INFO[0044] Updated catalog source kubeturbo-catalog with address and annotations
      INFO[0044] Deleted previous registry pod with name "quay-io-olmqe-kubeturbo-bundle-v8-4-0"
      INFO[0048] Approved InstallPlan install-nvwb5 for the Subscription: kubeturbo-operator-v8-4-0-sub
      INFO[0048] Waiting for ClusterServiceVersion "e2e-test-default-czzbg/kubeturbo-operator.v8.5.0" to reach 'Succeeded' phase
      INFO[0048] Waiting for ClusterServiceVersion "e2e-test-default-czzbg/kubeturbo-operator.v8.5.0" to appear
      FATA[0121] Failed to run bundle upgrade: error waiting for CSV to install: timed out waiting for the condition

      zhaoxia@xzha-mac ~ % oc get ip
      NAME CSV APPROVAL APPROVED
      install-2pdq2 kubeturbo-operator.v8.4.0 Manual true
      install-ds8ww kubeturbo-operator.v8.5.0 Manual false
      install-nvwb5 kubeturbo-operator.v8.4.0 Manual true

      Actual results:
      "operator-sdk run bundle" generates 2 install plans, operator-sdk run bundle-upgrade approve the wrong installplan.

      Expected results:
      "operator-sdk run bundle" generates 1 install plan, operator-sdk run bundle-upgrade success.

      Additional info:
      attached is the olm and catalog operator log

              rh-ee-bpalmer Bryce Palmer
              rhn-support-xzha Xia Zhao
              Keenon Lee Keenon Lee
              Red Hat Employee
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: