Bug 1456989 - [3.2][RFE] Randomize node lists
Summary: [3.2][RFE] Randomize node lists
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Routing
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.2.1
Assignee: Samuel Munilla
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On: 1447115
Blocks: 1455325 1455326 1455327
TreeView+ depends on / blocked
 
Reported: 2017-05-30 21:28 UTC by Eric Paris
Modified: 2020-08-13 09:17 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Setting the router environment variable ROUTER_BACKEND_PROCESS_ENDPOINTS=shuffle will randomize the order of backends in the haproxy configuration. Reason: With long running sessions and a router which reloads regularly the first endpoint in the config may receive significantly more load than other backends. Setting the environment variable will randomize the order of the backends on every reload and thus help spread the load.
Clone Of: 1447115
Environment:
Last Closed: 2017-06-15 18:41:12 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1425 0 normal SHIPPED_LIVE OpenShift Container Platform 3.5, 3.4, 3.3, and 3.2 bug fix update 2017-06-15 22:35:53 UTC

Comment 1 Eric Paris 2017-05-30 21:29:38 UTC
https://github.com/openshift/ose/pull/735

Comment 3 zhaozhanqi 2017-06-01 07:49:12 UTC
Check this on v3.2.1.33 and haproxy images id(61699ea1f924)

Check the haproxy-config.template in the haproxy image was not merged the env ROUTER_BACKEND_PROCESS_ENDPOINTS. 

please help rebuild the image. thanks.

Comment 4 Brenton Leanhardt 2017-06-05 13:28:25 UTC
Sam, this fix makes changes to the router haproxy-config.template which lives in dist-git.  You will have to apply the change from each PR to the respective branch in the openshift-enterprise-haproxy-router-docker dist-git repo.  You can take a look at the remotes/origin/private-scratch-3.2 branch in that repo to see how I did it for a 3.2 scratch build.  Let me know if you have questions.

Comment 5 Samuel Munilla 2017-06-05 19:34:51 UTC
Images rebuilt with dist-git config changes.

Comment 6 zhaozhanqi 2017-06-06 02:28:01 UTC
verified this bug on openshift v3.2.1.34 with haproxy image:7841535d6e7b

steps:
 
   1. oc env dc/router-intranet ROUTER_BACKEND_PROCESS_ENDPOINTS=shuffle
   2. Create backend pod with replias=5
   3. Check the haproxy.config
  
      server d22048973ff6bfa86a7a29ee5d0adb75 10.1.0.8:8080 check inter 5000ms cookie d22048973ff6bfa86a7a29ee5d0adb75
                
  server 1edca0d98a7ee1e89a4a8b995793dabc 10.1.0.9:8080 check inter 5000ms cookie 1edca0d98a7ee1e89a4a8b995793dabc
                
  server f4e59a0fa86288143cf82cdb5e33bf03 10.1.0.6:8080 check inter 5000ms cookie f4e59a0fa86288143cf82cdb5e33bf03
                
  server f8491224f3859c6797f40f737235f9ec 10.1.0.3:8080 check inter 5000ms cookie f8491224f3859c6797f40f737235f9ec
                
  server 52c859482bde20a799bff459f23a9ef0 10.1.0.7:8080 check inter 5000ms cookie 52c859482bde20a799bff459f23a9ef0

Comment 8 errata-xmlrpc 2017-06-15 18:41:12 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, 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/RHBA-2017:1425


Note You need to log in before you can comment on or make changes to this bug.