Bug 1938922

Summary: Router HAProxy config file template is slow to render due to repetitive regex compilations
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: NetworkingAssignee: Andrew McDermott <amcdermo>
Networking sub component: router QA Contact: Arvind iyengar <aiyengar>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aiyengar, aos-bugs, bperkins, jdelft, mmasters
Version: 3.11.0   
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-20 19:27:19 UTC Type: ---
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: 1938921    
Bug Blocks: 1938923    

Comment 3 Arvind iyengar 2021-03-29 09:10:34 UTC
Verified in "4.6.0-0.nightly-2021-03-26-015331" release version. With this payload, it is observed that the haproxy template rendition continuous to happen under sub-seconds times during constant load of generating 5k routes at a time. As noted below, the time hovered closed to 800ms consistently with no notable spikes beyond it: 
------
oc get clusterversion                       
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2021-03-26-015331   True        False         156m    Cluster version is 4.6.0-0.nightly-2021-03-26-015331

oc get route | wc -l                     
5001

I0329 08:05:48.933878       1 router.go:449] template "msg"="writeConfig"  "duration"="894.941038ms"
I0329 08:05:53.777570       1 router.go:449] template "msg"="writeConfig"  "duration"="738.559017ms"
I0329 08:05:59.153738       1 router.go:449] template "msg"="writeConfig"  "duration"="1.114624645s"
I0329 08:06:03.867560       1 router.go:449] template "msg"="writeConfig"  "duration"="828.339329ms"
I0329 08:06:08.794525       1 router.go:449] template "msg"="writeConfig"  "duration"="755.20271ms"
I0329 08:06:13.776496       1 router.go:449] template "msg"="writeConfig"  "duration"="737.090098ms"
I0329 08:06:18.854449       1 router.go:449] template "msg"="writeConfig"  "duration"="814.947082ms"
------

Comment 8 errata-xmlrpc 2021-04-20 19:27:19 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 (OpenShift Container Platform 4.6.25 bug fix 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/RHBA-2021:1153