Fix TO atscfg missing max origin conns#4344
Conversation
61a6a45 to
d4532b1
Compare
There was a problem hiding this comment.
When i set max origin conns > 0 for delivery services that do NOT employ the mid-tier (i.e. DNS_LIVE) this looks good. When I call GET api/1.4/cdns/cdn-name/configfiles/ats/hdr_rw_xml-id.config, I see the following:
# DO NOT EDIT - Generated for cdn-name by Traffic Ops (https://trafficops.domain.net/) on Tue Jan 28 15:40:07 UTC 2020
cond %{REMAP_PSEUDO_HOOK}
set-config proxy.config.http.origin_max_connections 1000 [L]
But when i set max origin conns > 0 for delivery services that DO employ the mid-tier (i.e. DNS), I am not seeing an entry in any of the hdr_rw_mid_xml-id.config files.
Fixes a misordered SQL scan, which caused the Server Status to be missing, causing the config gen to think there were no online servers, and thus not create the max_origin_connections entry.
d4532b1 to
9f24b66
Compare
|
@mitchell852 Ah, the Mid query had the same bug. I fixed that too, both bugs should be fixed now. |
mitchell852
left a comment
There was a problem hiding this comment.
I tested delivery services that employ the mid-tier and ones that do not and set max origin conns to >0 and 0 and saw the appropriate entry in hdr_rw_xml-id.config or hdr_rw_mid_xml-id.config using the following apis:
GET /api/1.4/cdns/cdn-name/configfiles/ats/hdr_rw_mid_xml-id.config
GET /api/1.4/cdns/cdn-name/configfiles/ats/hdr_rw_xml-id.config
I also checked that the location params were created and assigned to the appropriate profiles.
All TO API tests passed as well.
|
@rob05c - reminder to backport this to 4.0.x branch |
There was a problem hiding this comment.
FWIW I am getting some API test failures since this merged
hdr_rw_dot_config_test.go:110: expected 6 lines in the config (actual = 8)
hdr_rw_dot_config_test.go:90: expected 6 lines in the config (actual = 8)
@rob05c would you mind taking a look? or just run them and reconfirm that yours passed and mine should too :)
Fixes a misordered SQL scan, which caused the Server Status to be missing, causing the config gen to think there were no online servers, and thus not create the max_origin_connections entry. (cherry picked from commit a14d3d4)
Fixes a misordered SQL scan, which caused the Server Status to be missing, causing the config gen to think there were no online servers, and thus not create the max_origin_connections entry. (cherry picked from commit a14d3d4) Co-authored-by: Robert Butts <rob05c@users.noreply.github.com>
Fixes a misordered SQL scan, which caused the Server Status to be
missing, causing the config gen to think there were no online servers,
and thus not create the max_origin_connections entry.
Note this is only in the old TO endpoints, not the config generator. The
atstccfggenerator doesn't have this issue.Includes TO API (Integration) tests.
No docs, no interface change.
No changelog, no interface change.
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Run TO API Tests.
Set Max Origin Connections on a DS, request the header rewrite endpoint for that DS, verify it includes a max_origin_connections entry.
If this is a bug fix, what versions of Traffic Control are affected?
The following criteria are ALL met by this PR
Additional Information