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

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

    XMLWordPrintable

Details

    • No
    • Sprint 239, Sprint 240
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, the OpenShift Router directed traffic to a route with a weight of `0` when it had only one back end. With this update, the router will not send traffic to routes with a single backend with weight `0`. (link:https://issues.redhat.com/browse/OCPBUGS-16623[*OCPBUGS-16623*])
      Show
      * Previously, the OpenShift Router directed traffic to a route with a weight of `0` when it had only one back end. With this update, the router will not send traffic to routes with a single backend with weight `0`. (link: https://issues.redhat.com/browse/OCPBUGS-16623 [* OCPBUGS-16623 *])
    • Bug Fix
    • Done

    Description

      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
              frigault Francois Rigault
              Shudi Li Shudi Li
              Votes:
              2 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: