Bug 1997407

Summary: power-of-two balancing feature set "Random" as default balancing for passthrough routes
Product: OpenShift Container Platform Reporter: Arvind iyengar <aiyengar>
Component: NetworkingAssignee: Miciah Dashiel Butler Masters <mmasters>
Networking sub component: router QA Contact: Arvind iyengar <aiyengar>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aos-bugs, mmasters
Version: 4.9   
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2000414 (view as bug list) Environment:
Last Closed: 2021-10-18 17:48:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2000414    

Description Arvind iyengar 2021-08-25 07:47:51 UTC
Description of problem:
power-of-two balancing feature set "Random" as default balancing for the passthrough routes instead of "source"

OpenShift release version:
release: 4.9.0-0.nightly-2021-08-24-235829

How reproducible:
Frequently

Steps to Reproduce (in detail):
1. Create a project with required pods and service resources
2. Expose a passthrough route from the project
3. Check the haproxy configuration for the passthough route


Actual results: 
Inside the proxy pod:
$ env | grep -i random 
ROUTER_LOAD_BALANCE_ALGORITHM=random

# Secure backend, pass through
backend be_tcp:q2n1d:route-passth
  balance random  <-----

  hash-type consistent
  timeout check 5000ms
  server pod:web-server-rc-hr7q2:service-secure:https:10.131.0.25:8443 10.131.0.25:8443 weight 256

Expected results:
As per the original proposal for this feature, the passthrough routes are supposed to be configured with "source" balancing to have some measure of session affinity.

Impact of the problem:
Since with the passthrough type connections, the use of cookies to manage session affinity like other connections is not possible, this connection type would need "source" balancing as default

Additional info:
This change of configuration likely appears to be a side effect of changes from https://bugzilla.redhat.com/show_bug.cgi?id=1988801

Comment 1 Arvind iyengar 2021-08-30 05:57:32 UTC
Verified in "4.9.0-0.ci.test-2021-08-30-050301-ci-ln-b97npit-latest" release version. With this payload, it is observed that the passthrough routes now defaults to the "source" algorithm with Power-of-two balancing in effect:
-----
oc get clusterversion
NAME      VERSION                                                  AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.9.0-0.ci.test-2021-08-30-050301-ci-ln-b97npit-latest   True        False         17m     Cluster version is 4.9.0-0.ci.test-2021-08-30-050301-ci-ln-b97npit-latest


# Secure backend, pass through
backend be_tcp:test1:passth-route
  balance source  <----

  hash-type consistent
  timeout check 5000ms
  server pod:web-server-rc-sbkm6:service-secure:https:10.131.0.29:8443 10.131.0.29:8443 weight 256
-----

Comment 6 errata-xmlrpc 2021-10-18 17:48:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3759