You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2021/10/25 18:55:59 UTC
[trafficserver] 01/01: Merge remote-tracking branch
'upstream/master' into rebase_10_dev
This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch 10-Dev
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 62d69ef45a417afaa11218ea2a45914f2eac55e2
Merge: 4deeb25 636d42a
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Mon Oct 25 18:43:49 2021 +0000
Merge remote-tracking branch 'upstream/master' into rebase_10_dev
.asf.yaml | 16 +
.github/workflows/stale.yml | 1 +
.gitignore | 6 +
.vscode/c_cpp_properties.json | 55 +-
CODEOWNERS | 11 +-
Makefile.am | 2 +-
build/ax_cc_for_build.m4 | 76 ++
build/crypto.m4 | 22 +-
configure.ac | 13 +-
doc/README.md | 55 +
doc/admin-guide/files/records.config.en.rst | 78 +-
doc/admin-guide/files/sni.yaml.en.rst | 34 +-
doc/admin-guide/files/strategies.yaml.en.rst | 17 +-
doc/admin-guide/layer-4-routing.en.rst | 48 +
.../statistics/core/http-connection.en.rst | 14 +
.../monitoring/statistics/core/ssl.en.rst | 47 +
doc/admin-guide/plugins/cache_promote.en.rst | 6 +-
.../plugins/cache_range_requests.en.rst | 18 +
doc/admin-guide/plugins/header_rewrite.en.rst | 8 +
doc/admin-guide/plugins/lua.en.rst | 1 +
doc/admin-guide/plugins/multiplexer.en.rst | 67 +-
doc/admin-guide/plugins/prefetch.en.rst | 4 +
doc/admin-guide/plugins/slice.en.rst | 11 -
doc/admin-guide/security/index.en.rst | 13 +-
doc/admin-guide/security/mtls.en.rst | 166 +++
doc/admin-guide/storage/index.en.rst | 2 +-
.../api/functions/TSContScheduleOnPool.en.rst | 6 +
.../api/functions/TSHttpConnectPlugin.en.rst | 2 +-
.../api/functions/TSHttpOverridableConfig.en.rst | 1 +
.../api/functions/TSHttpTxnCntl.en.rst | 36 +
doc/developer-guide/api/functions/TSTypes.en.rst | 8 +-
.../api/functions/TSVConnSslSniGet.en.rst | 33 +
.../api/types/TSHttpCntlType.en.rst | 65 ++
.../api/types/TSOverridableConfigKey.en.rst | 1 +
.../testing/blackbox-testing.en.rst | 2 +
doc/uml/l4-pre-warming-overview.uml | 32 +
include/ts/apidefs.h.in | 12 +
include/ts/experimental.h | 17 -
include/ts/ts.h | 7 +
include/tscore/BufferWriterForward.h | 1 +
include/tscore/HTTPVersion.h | 2 +
include/tscore/PendingAction.h | 129 +++
include/tscore/TSSystemState.h | 21 +-
include/tscore/ink_config.h.in | 1 +
include/tscore/ink_inet.h | 70 +-
include/tscpp/util/MemSpan.h | 1 +
iocore/cache/CacheWrite.cc | 6 +-
iocore/eventsystem/I_EThread.h | 3 +
iocore/eventsystem/I_Thread.h | 1 +
iocore/hostdb/HostDB.cc | 2 +-
iocore/hostdb/P_RefCountCache.h | 2 +-
iocore/hostdb/test_RefCountCache.cc | 2 +-
iocore/net/I_NetProcessor.h | 1 +
iocore/net/I_NetVConnection.h | 5 +-
iocore/net/Makefile.am | 1 +
iocore/net/P_NetVConnection.h | 2 +-
iocore/net/P_SNIActionPerformer.h | 12 +-
iocore/net/P_SSLConfig.h | 2 +
iocore/net/P_SSLNetVConnection.h | 25 +-
iocore/net/P_SSLSNI.h | 2 +-
iocore/net/P_SSLSecret.h | 6 +
iocore/net/P_SSLUtils.h | 104 +-
iocore/net/P_UnixNetVConnection.h | 22 +-
iocore/net/ProxyProtocol.cc | 4 +-
iocore/net/QUICNetProcessor.cc | 2 +-
iocore/net/QUICNetVConnection.cc | 4 +-
iocore/net/QUICPacketHandler.cc | 2 +-
iocore/net/SSLCertLookup.cc | 6 +-
iocore/net/SSLClientCoordinator.cc | 1 +
iocore/net/SSLClientUtils.cc | 13 +-
iocore/net/SSLConfig.cc | 13 +
iocore/net/SSLNetVConnection.cc | 22 +-
iocore/net/SSLSNIConfig.cc | 19 +-
iocore/net/SSLSecret.cc | 11 +-
iocore/net/SSLSessionCache.cc | 42 +-
iocore/net/SSLSessionCache.h | 11 +-
iocore/net/SSLUtils.cc | 94 ++
iocore/net/TLSSessionResumptionSupport.cc | 3 +
iocore/net/UnixConnection.cc | 13 +-
iocore/net/UnixNet.cc | 4 +-
iocore/net/UnixNetAccept.cc | 19 +-
iocore/net/UnixNetProcessor.cc | 3 +-
iocore/net/UnixUDPNet.cc | 6 +-
iocore/net/YamlSNIConfig.cc | 64 +-
iocore/net/YamlSNIConfig.h | 16 +
iocore/net/libinknet_stub.cc | 10 +
iocore/net/quic/QUICConfig.cc | 12 +-
iocore/net/quic/QUICConfig.h | 2 -
iocore/net/quic/QUICGlobals.cc | 17 -
iocore/net/quic/QUICTLS.cc | 6 -
iocore/net/quic/QUICTLS.h | 4 +-
iocore/net/quic/QUICTLS_boringssl.cc | 8 +-
iocore/net/quic/QUICTLS_openssl.cc | 8 +-
iocore/net/quic/QUICTypes.cc | 4 +-
iocore/net/quic/QUICTypes.h | 8 +-
iocore/net/test_certlookup.cc | 22 +-
lib/perl/lib/Apache/TS/AdminClient.pm | 1 +
lib/records/P_RecDefs.h | 5 -
lib/records/RecConfigParse.cc | 7 +-
lib/records/RecRawStats.cc | 4 +-
mgmt/LocalManager.cc | 4 +-
mgmt/Makefile.am | 2 +-
mgmt/RecordsConfig.cc | 22 +-
mgmt/api/CoreAPIShared.cc | 3 -
mgmt/api/Makefile.am | 2 +-
plugins/cache_promote/cache_promote.cc | 4 +-
plugins/cache_promote/configs.cc | 4 +
plugins/cache_promote/lru_policy.h | 3 +-
plugins/cache_promote/policy.h | 13 +
plugins/cache_range_requests/README.md | 17 +
.../cache_range_requests/cache_range_requests.cc | 23 +-
plugins/esi/combo_handler.cc | 4 +-
plugins/esi/lib/EsiGunzip.cc | 2 -
plugins/esi/serverIntercept.cc | 4 +-
plugins/experimental/acme/acme.c | 2 +-
plugins/experimental/cache_fill/cache_fill.cc | 2 +-
plugins/experimental/mysql_remap/mysql_remap.cc | 2 +-
plugins/experimental/rate_limit/limiter.h | 1 +
plugins/experimental/rate_limit/rate_limit.cc | 5 -
plugins/experimental/rate_limit/sni_limiter.cc | 11 +-
plugins/experimental/rate_limit/sni_selector.cc | 5 -
plugins/experimental/rate_limit/utilities.cc | 41 -
plugins/experimental/rate_limit/utilities.h | 1 -
plugins/experimental/slice/Config.cc | 2 +-
plugins/experimental/slice/slice.cc | 8 +-
plugins/experimental/statichit/statichit.cc | 46 +-
plugins/experimental/tls_bridge/tls_bridge.cc | 2 +-
plugins/generator/generator.cc | 4 +-
plugins/header_rewrite/factory.cc | 2 +
plugins/header_rewrite/operators.cc | 30 +-
plugins/header_rewrite/operators.h | 19 +
plugins/healthchecks/healthchecks.c | 2 +-
plugins/lua/ts_lua_http.c | 4 +-
plugins/lua/ts_lua_http_cntl.c | 21 +-
plugins/lua/ts_lua_http_config.c | 4 +-
plugins/multiplexer/dispatch.cc | 9 +-
plugins/multiplexer/dispatch.h | 8 +-
plugins/prefetch/configs.cc | 6 +
plugins/prefetch/configs.h | 13 +
plugins/prefetch/fetch.cc | 2 +-
plugins/prefetch/plugin.cc | 74 +-
plugins/regex_remap/regex_remap.cc | 3 +-
plugins/stats_over_http/stats_over_http.c | 2 +-
plugins/xdebug/xdebug.cc | 8 +-
proxy/Makefile.am | 2 +-
proxy/hdrs/MIME.cc | 2 +-
proxy/hdrs/URL.cc | 175 +--
proxy/hdrs/URL.h | 102 +-
proxy/hdrs/unit_tests/test_HdrHeap.cc | 6 +-
proxy/http/HttpBodyFactory.cc | 8 +-
proxy/http/HttpConfig.cc | 14 +-
proxy/http/HttpConfig.h | 7 +-
proxy/http/HttpProxyServerMain.cc | 7 +
proxy/http/HttpSM.cc | 241 ++--
proxy/http/HttpSM.h | 173 ++-
proxy/http/HttpTransact.cc | 12 +-
proxy/http/HttpTunnel.cc | 80 ++
proxy/http/HttpTunnel.h | 28 +-
proxy/http/Makefile.am | 16 +-
proxy/http/PreWarmAlgorithm.h | 122 ++
proxy/http/PreWarmConfig.cc | 75 ++
proxy/http/PreWarmConfig.h | 57 +
proxy/http/PreWarmManager.cc | 1170 ++++++++++++++++++++
proxy/http/PreWarmManager.h | 341 ++++++
proxy/http/remap/NextHopConsistentHash.cc | 356 +++---
proxy/http/remap/NextHopConsistentHash.h | 5 +-
proxy/http/remap/NextHopHealthStatus.cc | 11 +-
proxy/http/remap/RemapProcessor.cc | 7 +-
.../remap/unit-tests/test_NextHopConsistentHash.cc | 53 +-
proxy/http/unit_tests/test_PreWarm.cc | 223 ++++
proxy/http2/HTTP2.cc | 14 +-
proxy/http2/HTTP2.h | 2 +
proxy/http2/Http2CommonSession.h | 2 +
proxy/http2/Http2ConnectionState.cc | 3 +
proxy/http2/Http2Stream.cc | 8 +-
proxy/logging/LogAccess.cc | 8 +-
proxy/shared/UglyLogStubs.cc | 1 +
src/shared/overridable_txn_vars.cc | 3 +-
src/traffic_logcat/logcat.cc | 3 +-
src/traffic_quic/traffic_quic.cc | 8 +
src/traffic_server/InkAPI.cc | 141 ++-
src/traffic_server/InkAPITest.cc | 15 +-
src/traffic_server/traffic_server.cc | 2 +
src/traffic_top/traffic_top.cc | 4 +-
src/tscore/Makefile.am | 7 +-
src/tscore/Regex.cc | 8 +-
src/tscore/unit_tests/test_MMH.cc | 3 +
src/tscore/unit_tests/test_MemArena.cc | 19 +-
src/tscpp/api/Transaction.cc | 2 +-
src/tscpp/util/Makefile.am | 2 +-
tests/Makefile.am | 1 +
tests/Pipfile | 1 +
tests/README.md | 2 +
tests/gold_tests/basic/deny0.test.py | 11 +-
.../Makefile.am => gold_tests/bigobj/Makefile.inc} | 16 +-
tests/gold_tests/bigobj/bigobj.test.py | 21 +-
.../command_argument/verify_global_plugin.test.py | 6 +-
tests/gold_tests/h2/h2active_timeout.py | 2 +
tests/gold_tests/h2/h2bigclient.py | 2 +
tests/gold_tests/h2/h2chunked.py | 2 +
tests/gold_tests/h2/h2client.py | 2 +
tests/gold_tests/h2/http2.test.py | 15 +-
tests/gold_tests/h2/httpbin.test.py | 5 +-
.../headers/domain-blacklist-30x.test.py | 31 +-
.../headers/general-connection-failure-502.test.py | 6 +-
tests/gold_tests/headers/http408.test.py | 5 +-
tests/gold_tests/logging/all_headers.test.py | 19 +-
tests/gold_tests/logging/gold/pqsi-pqsp.gold | 2 +
tests/gold_tests/logging/log_pipe.test.py | 3 +-
tests/gold_tests/logging/new_log_flds.test.py | 7 +-
tests/gold_tests/logging/pqsi-pqsp.test.py | 95 ++
tests/gold_tests/logging/sigusr2.test.py | 5 +-
.../pluginTest/combo_handler/combo_handler.test.py | 9 +-
.../gold/header_rewrite_cond_cache.gold | 18 +-
.../pluginTest/multiplexer/gold/multiplexer.gold | 1 -
.../pluginTest/multiplexer/multiplexer.test.py | 224 +++-
.../replays/multiplexer_copy.replay.yaml | 113 ++
.../multiplexer_copy_skip_post.replay.yaml} | 69 +-
.../replays/multiplexer_original.replay.yaml | 122 ++
.../multiplexer_original_skip_post.replay.yaml | 122 ++
.../regex_remap/gold/regex_remap_redirect.gold | 2 +-
.../pluginTest/regex_remap/regex_remap.test.py | 2 +-
.../regex_revalidate/regex_revalidate.test.py | 14 +-
.../gold/stats_over_http_0_stderr.gold | 11 +
.../gold/stats_over_http_0_stdout.gold | 4 +
.../stats_over_http/stats_over_http.test.py | 76 ++
.../pluginTest/traffic_dump/traffic_dump.test.py | 126 +--
.../traffic_dump/traffic_dump_http3.test.py | 26 +-
.../traffic_dump/traffic_dump_ip_filter.test.py | 3 +-
.../traffic_dump_response_body.test.py | 3 +-
.../traffic_dump/traffic_dump_sni_filter.test.py | 26 +-
.../pluginTest/traffic_dump/verify_replay.py | 2 +
.../xdebug/x_cache_info/x_cache_info.test.py | 4 +-
.../xdebug/x_effective_url/x_effective_url.test.py | 8 +-
.../pluginTest/xdebug/x_remap/x_remap.test.py | 8 +-
tests/gold_tests/redirect/redirect.test.py | 26 +-
tests/gold_tests/redirect/redirect_actions.test.py | 12 +-
tests/gold_tests/remap/gold/remap-https-200_3.gold | 13 +
tests/gold_tests/remap/gold/remap2-200.gold | 14 +
tests/gold_tests/remap/remap_http.test.py | 10 +
tests/gold_tests/remap/remap_https.test.py | 10 +
tests/gold_tests/slow_post/slow_post.test.py | 5 +-
tests/gold_tests/slow_post/slow_post_client.py | 2 +
tests/gold_tests/thread_config/check_threads.py | 2 +
.../gold_tests/thread_config/thread_config.test.py | 41 +-
tests/gold_tests/tls/ssl-post.c | 2 -
tests/gold_tests/tls/test-0rtt-s_client.py | 2 +
tests/gold_tests/tls/tls_0rtt_server.test.py | 20 +-
tests/gold_tests/tls/tls_hooks_verify.test.py | 3 +-
.../tls/tls_session_key_logging.replay.yaml} | 38 +-
.../gold_tests/tls/tls_session_key_logging.test.py | 96 ++
tests/gold_tests/tls/tls_sni_host_policy.test.py | 78 +-
tests/tools/lib/replay_schema.json | 2 +-
tests/tools/plugins/Makefile.inc | 5 +
tests/tools/plugins/ssl_verify_test.cc | 4 +
255 files changed, 6150 insertions(+), 1407 deletions(-)
diff --cc doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst
index 3acf484,1009187..e044e4f
--- a/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst
+++ b/doc/developer-guide/api/functions/TSContScheduleOnPool.en.rst
@@@ -138,5 -129,7 +143,6 @@@ the same continuation on two different
See Also
========
-:doc:`TSContSchedule.en`
-:doc:`TSContScheduleEvery.en`
+:doc:`TSContScheduleEveryOnPool.en`
:doc:`TSContScheduleOnThread.en`
+ :doc:`TSLifecycleHookAdd.en`
diff --cc proxy/http/HttpConfig.cc
index 79ba532,9b8f372..0cf48e4
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@@ -1430,11 -1443,22 +1439,13 @@@ HttpConfig::reconfigure(
params->disable_ssl_parenting = INT_TO_BOOL(m_master.disable_ssl_parenting);
params->oride.forward_connect_method = INT_TO_BOOL(m_master.oride.forward_connect_method);
- params->server_max_connections = m_master.server_max_connections;
- params->max_websocket_connections = m_master.max_websocket_connections;
- params->oride.outbound_conntrack = m_master.oride.outbound_conntrack;
- params->global_outbound_conntrack = m_master.global_outbound_conntrack;
-
- // If queuing for outbound connection tracking is enabled without enabling max connections, it is meaningless, so we'll warn
- if (params->global_outbound_conntrack.queue_size > 0 &&
- !(params->oride.outbound_conntrack.max > 0 || params->oride.outbound_conntrack.min > 0)) {
- Warning("'%s' is set, but neither '%s' nor '%s' are "
- "set, please correct your %s",
- OutboundConnTrack::CONFIG_VAR_QUEUE_SIZE.data(), OutboundConnTrack::CONFIG_VAR_MAX.data(),
- OutboundConnTrack::CONFIG_VAR_MIN.data(), ts::filename::RECORDS);
- }
+ params->server_max_connections = m_master.server_max_connections;
+ params->max_websocket_connections = m_master.max_websocket_connections;
+ params->oride.outbound_conntrack = m_master.oride.outbound_conntrack;
++ params->global_outbound_conntrack = m_master.global_outbound_conntrack;
params->oride.attach_server_session_to_client = m_master.oride.attach_server_session_to_client;
params->oride.max_proxy_cycles = m_master.oride.max_proxy_cycles;
+ params->oride.tunnel_activity_check_period = m_master.oride.tunnel_activity_check_period;
params->http_request_line_max_size = m_master.http_request_line_max_size;
params->http_hdr_field_max_size = m_master.http_hdr_field_max_size;
diff --cc proxy/http/HttpSM.cc
index 81ed57e,aef9fc4..cb06c12
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@@ -5225,10 -5263,33 +5262,10 @@@ HttpSM::do_http_server_open(bool raw
if (ccount > t_state.txn_conf->outbound_conntrack.max) {
ct_state.release();
- ink_assert(pending_action.is_empty()); // in case of reschedule must not have already pending.
+ ink_assert(pending_action.empty()); // in case of reschedule must not have already pending.
- // If the queue is disabled, reschedule.
- if (t_state.http_config_param->global_outbound_conntrack.queue_size < 0) {
- ct_state.enqueue();
- ct_state.rescheduled();
- pending_action = eventProcessor.schedule_in(
- this, HRTIME_MSECONDS(t_state.http_config_param->global_outbound_conntrack.queue_delay.count()));
- } else if (t_state.http_config_param->global_outbound_conntrack.queue_size > 0) { // queue enabled, check for a slot
- auto wcount = ct_state.enqueue();
- if (wcount < t_state.http_config_param->global_outbound_conntrack.queue_size) {
- ct_state.rescheduled();
- SMDebug("http", "%s", lbw().print("[{}] queued for {}\0", sm_id, t_state.current.server->dst_addr).data());
- pending_action = eventProcessor.schedule_in(
- this, HRTIME_MSECONDS(t_state.http_config_param->global_outbound_conntrack.queue_delay.count()));
- } else { // the queue is full
- ct_state.dequeue(); // release the queue slot
- ct_state.blocked(); // note the blockage.
- HTTP_INCREMENT_DYN_STAT(http_origin_connections_throttled_stat);
- send_origin_throttled_response();
- }
- } else { // queue size is 0, always block.
- ct_state.blocked();
- HTTP_INCREMENT_DYN_STAT(http_origin_connections_throttled_stat);
- send_origin_throttled_response();
- }
-
+ ct_state.blocked();
+ HTTP_INCREMENT_DYN_STAT(http_origin_connections_throttled_stat);
ct_state.Warn_Blocked(&t_state.txn_conf->outbound_conntrack, sm_id, ccount - 1, &t_state.current.server->dst_addr.sa,
debug_on && is_debug_tag_set("http") ? "http" : nullptr);
send_origin_throttled_response();