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

OpenShift Router still sends traffic to its only backend when weight is 0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done-Errata
    • Major
    • 4.12.z
    • 4.13.z, 4.12.z, 4.14.z
    • Networking / router
    • No
    • 2
    • Sprint 241
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Previously, the OpenShift Router directed traffic to a route with a weight of 0 when it had only one backend. With this update, the router will not send traffic to routes with a single backend with weight 0.
    • Bug Fix

    Description

      This is a clone of issue OCPBUGS-17107. gspence@redhat.com manually made this bug for tracking 4.12 backport.

      The following is the description of the original issue:

      Description of problem:

      per oc set route-backends -h output:
      Routes may have one or more optional backend services with weights controlling how much traffic flows to each service.
      [...]
      **If all weights are zero the route will not send traffic to any backends.**
      
      this is not the case anymore for a route with a single backend.

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

      at least from OCP 4.12 onward

      How reproducible:

      all the time

      Steps to Reproduce:

      1. kubectl create -f example/
      2. kubectl patch route example -p '{"spec":{"to": {"weight": 0}}}' --type merge
      3. curl http://localhost -H "Host: example.local" 

      Actual results:

      curl succeeds

      Expected results:

      curl fails

      Additional info:

      https://access.redhat.com/support/cases/#/case/03567697

      is regression following NE-822. Reverting
      https://github.com/openshift/router/commit/9656da7d5e2ac0962f3eaf718ad7a8c8b2172cfa makes it work again.

      Attachments

        Issue Links

          Activity

            People

              gspence@redhat.com Grant Spence
              openshift-crt-jira-prow OpenShift Prow Bot
              Shudi Li Shudi Li
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: