stack/erp5: implement Zope's rewrite rules in ERP5 balancer partition
The strategy for compatibility is that: - haproxy still listen on the same port as before, without rewrite rule. This is called "legacy" port. - for each frontend from request parameters, we introduce an haproxy frontend with a rewrite for the corresponding `internal-path` parameter. - the shared frontend instance is updated to use this new frontend entry from haproxy. This will cause a small downtime until the shared frontend is updated to the new URL on ERP5, but since this feature was not used, it's OK. Technical details are that we: - split haproxy config to have frontends and backends. - introduce one frontend in haproxy for each frontend from request parameters. - routing-rule-list argument is still honored the same way, globally and after path from frontend. - change the shared frontend requests to use "" type, no longer "zope" type. - we don't do automatic detection of /VirtualHostRoot in URL but always add it, because it could be used to trick zope into thinking it serves requests for an arbitrary host and do open redirects - before using the request's host header in virtualhost path, we check that it does not contain /, to prevent injection of virutalhost path elements through the host header. - we don't use the "path" parameter from shared frontend, because we want the frontend to be simple, so we don't want it to rewrite the request path (which is also the reason why we deprecated "zope" type) - the tests have changed a lot, because they were using what's now the "legacy" URL types, so we updated it to use the new URL types with all the /VirtualHostRoot/../ in path and also because they use IPv6 URL, no longer IPv4
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#643448
external
|
SlapOS.Eggs.UnitTest-TestRunner1.Python2 |
00:13:29
|
||||||
passed |
#643453
external
|
SlapOS.Eggs.UnitTest-TestRunner1.Python3 |
00:14:47
|
||||||
failed |
#643402
external
|
SlapOS.SoftwareReleases.IntegrationTest-TestRunner1 |
06:04:16
|
||||||
failed |
#643298
external
|
SlapOS.SoftwareReleases.IntegrationTest-TestRunner1-DebianNext |
34:14:30
|
||||||
passed |
#643400
external
retried
|
SlapOS.Eggs.UnitTest-TestRunner1.Python2 |
00:16:03
|
||||||
passed |
#643242
external
retried
|
SlapOS.Eggs.UnitTest-TestRunner1.Python2 |
00:13:49
|
||||||
passed |
#643292
external
retried
|
SlapOS.Eggs.UnitTest-TestRunner1.Python2 |
00:14:43
|
||||||
passed |
#643329
external
retried
|
SlapOS.Eggs.UnitTest-TestRunner1.Python2 |
00:14:45
|
||||||
passed |
#643255
external
retried
|
SlapOS.Eggs.UnitTest-TestRunner1.Python3 |
00:17:37
|
||||||
passed |
#643368
external
retried
|
SlapOS.Eggs.UnitTest-TestRunner1.Python3 |
00:16:30
|
||||||
passed |
#643241
external
retried
|
SlapOS.Eggs.UnitTest-TestRunner1.Python3 |
00:14:51
|
||||||
passed |
#643332
external
retried
|
SlapOS.Eggs.UnitTest-TestRunner1.Python3 |
00:15:58
|
||||||
failed |
#643240
external
retried
|
SlapOS.SoftwareReleases.IntegrationTest-TestRunner1 |
04:57:20
|
||||||
failed |
#643252
external
retried
|
SlapOS.SoftwareReleases.IntegrationTest-TestRunner1 |
07:10:58
|
||||||