Bug 1938921 - Router HAProxy config file template is slow to render due to repetitive regex compilations
Summary: Router HAProxy config file template is slow to render due to repetitive regex...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.7.z
Assignee: Andrew McDermott
QA Contact: Arvind iyengar
URL:
Whiteboard:
Depends On: 1937972
Blocks: 1938922
TreeView+ depends on / blocked
 
Reported: 2021-03-15 08:27 UTC by OpenShift BugZilla Robot
Modified: 2022-08-04 22:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-05 13:56:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift router pull 269 0 None open [release-4.7] Bug 1938921: router/template: Cache compiled regular expressions 2021-03-16 17:05:50 UTC
Red Hat Product Errata RHSA-2021:1005 0 None None None 2021-04-05 13:56:32 UTC

Comment 2 Arvind iyengar 2021-03-25 10:57:43 UTC
Verified in "4.7.0-0.nightly-2021-03-24-213550" 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 500ms consistently with no notable spikes beyond it: 
------
oc get clusterversion    
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2021-03-24-213550   True        False         8h      Cluster version is 4.7.0-0.nightly-2021-03-24-213550

oc -n openshift-ingress logs  router-default-5bfcc867fc-lnrp7  -f | grep -i Writeconfig
I0325 08:27:10.314032       1 router.go:456] template "msg"="writeConfig"  "duration"="59.405014ms"
I0325 08:27:15.314489       1 router.go:456] template "msg"="writeConfig"  "duration"="59.782366ms"
I0325 08:27:20.313557       1 router.go:456] template "msg"="writeConfig"  "duration"="58.760965ms"
I0325 08:27:25.316040       1 router.go:456] template "msg"="writeConfig"  "duration"="61.145185ms"
I0325 08:27:30.314349       1 router.go:456] template "msg"="writeConfig"  "duration"="59.359811ms"
I0325 08:27:35.294904       1 router.go:456] template "msg"="writeConfig"  "duration"="39.820195ms"
I0325 08:27:40.318171       1 router.go:456] template "msg"="writeConfig"  "duration"="62.979913ms"
I0325 08:27:45.296150       1 router.go:456] template "msg"="writeConfig"  "duration"="40.852918ms"
 
I0325 10:20:37.898634       1 router.go:456] template "msg"="writeConfig"  "duration"="424.361488ms"
I0325 10:20:42.900593       1 router.go:456] template "msg"="writeConfig"  "duration"="426.368431ms"
I0325 10:20:47.905153       1 router.go:456] template "msg"="writeConfig"  "duration"="430.808979ms"
I0325 10:20:52.854680       1 router.go:456] template "msg"="writeConfig"  "duration"="380.227026ms"
I0325 10:20:57.925729       1 router.go:456] template "msg"="writeConfig"  "duration"="451.175934ms"
I0325 10:21:02.913331       1 router.go:456] template "msg"="writeConfig"  "duration"="438.707291ms"   
 
I0325 10:49:17.992727       1 router.go:456] template "msg"="writeConfig"  "duration"="479.737095ms"
I0325 10:49:23.022972       1 router.go:456] template "msg"="writeConfig"  "duration"="509.909029ms"
I0325 10:49:28.063640       1 router.go:456] template "msg"="writeConfig"  "duration"="550.487276ms"
I0325 10:49:33.031263       1 router.go:456] template "msg"="writeConfig"  "duration"="518.004707ms"
I0325 10:49:37.973882       1 router.go:456] template "msg"="writeConfig"  "duration"="460.525431ms"


oc get route | wc -l               
5003
------

Comment 5 errata-xmlrpc 2021-04-05 13:56:14 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.7.5 security and 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/RHSA-2021:1005


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