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

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

XMLWordPrintable

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

      None

      Show
      None
    • Hide
      *Cause*: Creating an LB service for the default Ingress Operator
      *Consequence*: Log message is triggered when a change is not made
      *Fix*: Fixed the logic of the log message
      *Result*: Bug doesn’t present anymore. Log message only triggered when a change is made to the Infra CR
      Show
      *Cause*: Creating an LB service for the default Ingress Operator *Consequence*: Log message is triggered when a change is not made *Fix*: Fixed the logic of the log message *Result*: Bug doesn’t present anymore. Log message only triggered when a change is made to the Infra CR
    • Bug Fix
    • In Progress

      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
            cholman@redhat.com Candace Holman
            Shudi Li Shudi Li
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: