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

parseIPList logs "empty list found" at V(0) causing excessive log spam

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.18, 4.19, 4.20
    • Networking / router
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Yes
    • All
    • None
    • Rejected
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      The `parseIPList` function in `pkg/router/template/template_helper.go` logs at verbosity level `V(0)` when it receives an empty IP allowlist string. Since `V(0)` messages are always emitted regardless of log verbosity settings, this causes massive log spam on clusters with many routes that don't have `haproxy.router.openshift.io/ip_allowlist` annotations.

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

          N/A

      How reproducible: Always

      Steps to Reproduce:

          1. Deploy OKD/OpenShift 4.x cluster
          2. Create multiple routes without `ip_allowlist` or `ip_whitelist` annotations
          3. Observe router pod logs: `oc logs -n openshift-ingress -l ingresscontroller.operator.openshift.io/deployment-ingresscontroller=default`
          4. Trigger a config reload (create/modify any route, service, or endpoint)
          5. Observe flood of "parseIPList empty list found" messages

      Actual results:

      On a cluster with 822 routes (none with allowlist annotations), every config reload generates {}822 log messages{}:

      I0108 15:56:42.194350  1 template_helper.go:370] "msg"="parseIPList empty list found" "logger"="template"
      I0108 15:56:42.194433  1 template_helper.go:370] "msg"="parseIPList empty list found" "logger"="template"
      I0108 15:56:42.194511  1 template_helper.go:370] "msg"="parseIPList empty list found" "logger"="template"
      ... (repeated 822 times per reload)
      

      Expected results:

      An empty/absent IP allowlist is the normal, expected configuration for most routes. This should not generate a log message at V(0). The log level should be V(7) or higher (debug/trace level) to match other informational messages in the same function.

      Additional info:

      Also filed github issue https://github.com/openshift/router/issues/708.

              alebedev@redhat.com Andrey Lebedev
              andrei@tensor-tech.io Andrei Neagoe
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: