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

operator CR does not indicate the healthy status

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.15
    • OLM
    • Quality / Stability / Reliability
    • False
    • Hide

      None

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

      Description of problem:

      We have TP feature in 4.15 for OLMv1.
      when we use operator to install package, even the resource of package does not work, the operator does not indicate it and it show success.
      (current bundledeployment indicate it does not work with healthy)
      
      

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

      [root@preserve-olm-env2 operator]# oc get clusterversion
      NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.15.0-0.nightly-2023-11-19-195637   True        False         6h14m   Cluster version is 4.15.0-0.nightly-2023-11-19-195637

      How reproducible:

      always

      Steps to Reproduce:

      oc patch featuregate cluster -p '{"spec": {"featureSet": "TechPreviewNoUpgrade"}}' --type=merge
      featuregate.config.openshift.io/cluster patched
      
      [root@preserve-olm-env2 operator]# cat catalogd.yaml 
      apiVersion: catalogd.operatorframework.io/v1alpha1
      kind: Catalog
      metadata:
        name: catalog-68903
      spec:
        source:
          type: image
          image:
            ref: quay.io/olmqe/olmv1index:68903
      [root@preserve-olm-env2 operator]# oc apply -f catalogd.yaml 
      catalog.catalogd.operatorframework.io/catalog-68903 created
      [root@preserve-olm-env2 operator]# cat 68903-pod-unhealthy.yaml 
      apiVersion: operators.operatorframework.io/v1alpha1
      kind: Operator
      metadata:
        name: pod-68903-unhealthy
      spec:
        packageName: pod-68903-unhealthy
      [root@preserve-olm-env2 operator]# oc apply -f 68903-pod-unhealthy.yaml 
      operator.operators.operatorframework.io/pod-68903-unhealthy created
      [root@preserve-olm-env2 operator]# oc get operator.operators.operatorframework.io pod-68903-unhealthy
      NAME                  AGE
      pod-68903-unhealthy   22s
      [root@preserve-olm-env2 operator]# oc get operator.operators.operatorframework.io pod-68903-unhealthy -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":"pod-68903-unhealthy"},"spec":{"packageName":"pod-68903-unhealthy"}}
        creationTimestamp: "2023-11-20T07:41:35Z"
        generation: 1
        name: pod-68903-unhealthy
        resourceVersion: "242615"
        uid: 0924bd63-d269-48c3-afcc-6357ae954f8b
      spec:
        packageName: pod-68903-unhealthy
        upgradeConstraintPolicy: Enforce
      status:
        conditions:
        - lastTransitionTime: "2023-11-20T07:41:35Z"
          message: resolved to "quay.io/olmqe/olmv1bundle:plain-68903-podunhealthy"
          observedGeneration: 1
          reason: Success
          status: "True"
          type: Resolved
        - lastTransitionTime: "2023-11-20T07:41:41Z"
          message: installed from "quay.io/olmqe/olmv1bundle:plain-68903-podunhealthy"
          observedGeneration: 1
          reason: Success
          status: "True"
          type: Installed
        installedBundleResource: quay.io/olmqe/olmv1bundle:plain-68903-podunhealthy
        resolvedBundleResource: quay.io/olmqe/olmv1bundle:plain-68903-podunhealthy
      [root@preserve-olm-env2 operator]# oc get bd
      NAME                  ACTIVE BUNDLE                INSTALL STATE           AGE
      pod-68903-unhealthy   pod-68903-unhealthy-7vvwd4   InstallationSucceeded   47s
      [root@preserve-olm-env2 operator]# oc get bd pod-68903-unhealthy -o yaml
      apiVersion: core.rukpak.io/v1alpha1
      kind: BundleDeployment
      metadata:
        creationTimestamp: "2023-11-20T07:41:35Z"
        generation: 2
        name: pod-68903-unhealthy
        ownerReferences:
        - apiVersion: operators.operatorframework.io/v1alpha1
          blockOwnerDeletion: true
          controller: true
          kind: Operator
          name: pod-68903-unhealthy
          uid: 0924bd63-d269-48c3-afcc-6357ae954f8b
        resourceVersion: "242614"
        uid: baf9d5c5-f0a6-4a69-9661-144a8d403960
      spec:
        provisionerClassName: core-rukpak-io-plain
        template:
          metadata: {}
          spec:
            provisionerClassName: core-rukpak-io-plain
            source:
              image:
                ref: quay.io/olmqe/olmv1bundle:plain-68903-podunhealthy
              type: image
      status:
        activeBundle: pod-68903-unhealthy-7vvwd4
        conditions:
        - lastTransitionTime: "2023-11-20T07:41:35Z"
          message: Successfully unpacked the pod-68903-unhealthy-7vvwd4 Bundle
          reason: UnpackSuccessful
          status: "True"
          type: HasValidBundle
        - lastTransitionTime: "2023-11-20T07:41:41Z"
          message: Instantiated bundle pod-68903-unhealthy-7vvwd4 successfully
          reason: InstallationSucceeded
          status: "True"
          type: Installed
        - lastTransitionTime: "2023-11-20T07:41:41Z"
          message: '(/v1, Kind=Pod)(olmv1-68903-pod-unhealthy/hello-68903): object InProgress:
            Pod is in the Pending phase'
          reason: Unhealthy
          status: "False"
          type: Healthy
        observedGeneration: 2
      
      

      Actual results:

      per operator CR, it succeeds and think package works

      Expected results:

      per operator CR, should indicate package does not work.

      Additional info:

       

              agreene1991 Alexander Greene (Inactive)
              rhn-support-kuiwang Kui Wang
              None
              None
              Kui Wang Kui Wang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: