Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-2018

Subscription health check marks it degraded for InstallPlanMissing condition being true even if the operator has no issues

    • False
    • None
    • False
    • Hide
      Before this fix, Subscription health check was marked degraded for missing InstallPlan when more than 5 operators are installed in a project. With this fix, Subscription health check will not be marked as degraded for missing InstallPlan if more than 5 operators are installed in a project.
      Show
      Before this fix, Subscription health check was marked degraded for missing InstallPlan when more than 5 operators are installed in a project. With this fix, Subscription health check will not be marked as degraded for missing InstallPlan if more than 5 operators are installed in a project.

      There is an issue with the health check for subscription object in ArgoCD.

      A project can have max 5 InstallPlan objects. Whenever more than 5 operators are installed in a project, the oldest InstallPlan gets deleted. This is the default behaviour.

      Now if the operators are managed in ArgoCD as apps, the operator whose subscription has 'InstallPlanMissing' condition true is marked degraded which shouldn't always be the case. The operator works fine and just the InstallPlan being missing doesn't affect it's functionality. Also it shows all good on the Installed Operators page. Hence it shouldn't be marked degraded in GitOps just because InstallPlan is missing.

      The health check conditions need changes.

      https://github.com/argoproj/argo-cd/blob/master/resource_customizations/operators.coreos.com/Subscription/health.lua#L11

            [GITOPS-2018] Subscription health check marks it degraded for InstallPlanMissing condition being true even if the operator has no issues

            rhn-support-alosingh this would be a part of 1.6.2

            Ishita Sequeira added a comment - rhn-support-alosingh this would be a part of 1.6.2

            Hi rhn-support-alosingh , We'll cherry-pick the fix into upstream with Argo CD 2.4.12 (next patch release)
             
             

            Ishita Sequeira added a comment - Hi rhn-support-alosingh , We'll cherry-pick the fix into upstream with Argo CD 2.4.12 (next patch release)    

            Alok Singh added a comment -

            Hi isequeir@redhat.com, Please provide an update on this. The mentioned PR seems to be merged.

            Alok Singh added a comment - Hi isequeir@redhat.com , Please provide an update on this. The mentioned PR seems to be merged.

            PR has been raised with this fix in ArgoCD
            https://github.com/argoproj/argo-cd/pull/10450

            Ishita Sequeira added a comment - PR has been raised with this fix in ArgoCD https://github.com/argoproj/argo-cd/pull/10450

            gnunn@redhat.com Thanks for sharing the solution. The solution makes sense.

            I will create a  PR for this with the fix.

            Ishita Sequeira added a comment - gnunn@redhat.com Thanks for sharing the solution. The solution makes sense. I will create a  PR for this with the fix.

            Gerald Nunn added a comment -

            I think the solution to this is to modify the health to dig a little deeper, I'm using the following in my health check:

            elseif (condition.type == "InstallPlanMissing" and condition.reason ~= "ReferencedInstallPlanNotFound") then

            See here for full health check I'm using:

            https://github.com/gnunn-gitops/gitops-operator-install/blob/main/openshift-gitops/base/openshift-gitops-cr.yaml#L66

            Gerald Nunn added a comment - I think the solution to this is to modify the health to dig a little deeper, I'm using the following in my health check: elseif (condition.type == "InstallPlanMissing" and condition.reason ~= "ReferencedInstallPlanNotFound") then See here for full health check I'm using: https://github.com/gnunn-gitops/gitops-operator-install/blob/main/openshift-gitops/base/openshift-gitops-cr.yaml#L66

            Alok Singh added a comment -

            Hi Team, Is there any update on this?

            Alok Singh added a comment - Hi Team, Is there any update on this?

            Alok Singh added a comment -

            Hi aveerama@redhat.com,

            It's not an issue with the OLM. It's an expected beahviour to have 5 InstallPlans per namespace. This is to avoid unnecessary high number of InstallPlans in the cluster. It was discussed here - https://coreos.slack.com/archives/C3VS0LV41/p1648839289175399.

            I opened this bug as per the conversation here - https://coreos.slack.com/archives/CMP95ST2N/p1652123107943939.

            Alok Singh added a comment - Hi aveerama@redhat.com , It's not an issue with the OLM. It's an expected beahviour to have 5 InstallPlans per namespace. This is to avoid unnecessary high number of InstallPlans in the cluster. It was discussed here - https://coreos.slack.com/archives/C3VS0LV41/p1648839289175399 . I opened this bug as per the conversation here - https://coreos.slack.com/archives/CMP95ST2N/p1652123107943939 .

            This seems to be an issue with the OLM and not with Argo CD.

            Abhishek Veeramalla added a comment - This seems to be an issue with the OLM and not with Argo CD.

              isequeir@redhat.com Ishita Sequeira
              rhn-support-alosingh Alok Singh
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: