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

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


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


    • 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

      This is a clone of issue OCPBUGS-16623. 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:


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

            mmasters1@redhat.com Miciah Masters
            openshift-crt-jira-prow OpenShift Prow Bot
            Shudi Li Shudi Li
            0 Vote for this issue
            7 Start watching this issue