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

[Backport-4.16] Cluster-ingress-operator logs an update when one didn't happen

XMLWordPrintable

    • Low
    • No
    • 1
    • NE Sprint 259
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, the Cluster ingress operator logged non-existent updates. With this release, the issue is resolved. (link:https://issues.redhat.com/browse/OCPBUGS-39324[*OCPBUGS-39324*])
      Show
      * Previously, the Cluster ingress operator logged non-existent updates. With this release, the issue is resolved. (link: https://issues.redhat.com/browse/OCPBUGS-39324 [* OCPBUGS-39324 *])
    • Bug Fix
    • In Progress

      This is a clone of issue OCPBUGS-34413. The following is the description of the original issue:

      Description of problem:

      Cluster-ingress-operator logs an update when one didn't happen.

      % grep -e 'successfully updated Infra CR with Ingress Load Balancer IPs' -m 1 -- ingress-operator.log       
      2024-05-17T14:46:01.434Z	INFO	operator.ingress_controller	ingress/controller.go:326	successfully updated Infra CR with Ingress Load Balancer IPs
      
      % grep -e 'successfully updated Infra CR with Ingress Load Balancer IPs' -c -- ingress-operator.log 
      142
      

      https://github.com/openshift/cluster-ingress-operator/pull/1016 has a logic error, which causes the operator to log this message even when it didn't do an update:

      [https://github.com/openshift/cluster-ingress-operator/blob/009644a6b197b67f074cc34a07868ef01db31510/pkg/operator/controller/ingress/controller.go#L1135-L1145

      // If the lbService exists for the "default" IngressController, then update Infra CR's PlatformStatus with the Ingress LB IPs. 
      
      if haveLB && ci.Name == manifests.DefaultIngressControllerName 
      { if updated, err := computeUpdatedInfraFromService(lbService, infraConfig); err != nil 
      { errs = append(errs, fmt.Errorf("failed to update Infrastructure PlatformStatus: %w", err)) } 
      else if updated 
      { if err := r.client.Status().Update(context.TODO(), infraConfig); err != nil { errs = append(errs, fmt.Errorf("failed to update Infrastructure CR after updating Ingress LB IPs: %w", err)) } } 
      
      log.Info("successfully updated Infra CR with Ingress Load Balancer IPs") }
      

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

          4.17

      How reproducible:

          100%

      Steps to Reproduce:

          1. Create a LB service for the default Ingress Operator
          2. Watch ingress operator logs for the search strings mentioned above
          

      Actual results:

          Lots of these log entries will be seen even though no further updates are made to the default ingress operator:
      
      2024-05-17T14:46:01.434Z INFO operator.ingress_controller ingress/controller.go:326 successfully updated Infra CR with Ingress Load Balancer IPs

      Expected results:

          Only see this log entry when an update to Infra CR is made.  Perhaps just one the first time you add a LB service to the default ingress operator.

      Additional info:

           https://github.com/openshift/cluster-ingress-operator/pull/1016 was backported to 4.15, so it would be nice to fix it and backport the fix to 4.15. It is rather noisy, and it's trivial to fix.

            rh-ee-alsyed Ali Syed
            openshift-crt-jira-prow OpenShift Prow Bot
            Ishmam Amin Ishmam Amin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: