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 2022/11/18 22:03:44 UTC
[trafficserver] 01/01: Merge master into 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 f638450a0703f324dad71788a665956d2922d988
Merge: 9c6eb61f6 e37b35d79
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Fri Nov 18 21:39:51 2022 +0000
Merge master into 10-Dev
Conflicts:
mgmt/RecordsConfig.cc
.github/workflows/codeql.yml | 75 ++++++
.lgtm.yml => .tsan_suppressions | 38 +--
build/jemalloc.m4 | 2 +-
build/mimalloc.m4 | 2 +-
configure.ac | 28 ++
doc/admin-guide/files/strategies.yaml.en.rst | 11 +-
.../monitoring/statistics/core/eventloop.en.rst | 72 ++++-
doc/admin-guide/plugins/slice.en.rst | 5 +-
doc/admin-guide/plugins/traffic_dump.en.rst | 3 +-
include/records/I_RecMutex.h | 4 +-
include/tscore/ink_config.h.in | 1 +
include/tscpp/util/Histogram.h | 195 ++++++++++++++
iocore/aio/AIO.cc | 276 ++++++++++++++++++-
iocore/aio/I_AIO.h | 57 +++-
iocore/aio/P_AIO.h | 4 +
iocore/cache/Cache.cc | 67 ++---
iocore/cache/CacheHosting.cc | 2 +-
iocore/cache/CacheLink.cc | 176 ------------
iocore/cache/CacheVol.cc | 8 +-
iocore/cache/I_Cache.h | 1 -
iocore/cache/Makefile.am | 1 -
iocore/cache/P_CacheDir.h | 5 +-
iocore/cache/P_CacheHosting.h | 134 +++++++++-
iocore/cache/P_CacheInternal.h | 11 +-
iocore/cache/P_CacheVol.h | 125 +++++----
iocore/eventsystem/I_EThread.h | 296 ++++++++++++++++-----
iocore/eventsystem/UnixEThread.cc | 98 ++++---
iocore/eventsystem/UnixEventProcessor.cc | 106 +++++---
iocore/hostdb/HostDB.cc | 4 +-
iocore/hostdb/I_HostDBProcessor.h | 5 +-
iocore/net/P_UnixNet.h | 4 +
iocore/net/SSLConfig.cc | 4 +-
iocore/net/SSLNetProcessor.cc | 15 +-
iocore/net/UnixNet.cc | 35 +++
mgmt/RecordsConfig.cc | 13 +
plugins/experimental/slice/server.cc | 8 +-
plugins/experimental/slice/util.cc | 7 +-
plugins/experimental/statichit/statichit.cc | 85 ++++--
plugins/experimental/traffic_dump/session_data.cc | 36 ++-
plugins/experimental/traffic_dump/session_data.h | 19 +-
plugins/experimental/traffic_dump/traffic_dump.cc | 12 +-
proxy/http/HttpSM.cc | 15 +-
proxy/http/HttpTransact.h | 21 +-
proxy/shared/DiagsConfig.cc | 5 +
src/records/P_RecCore.cc | 4 +
src/records/RecMutex.cc | 2 +-
src/records/RecUtils.cc | 2 +-
src/traffic_server/InkAPI.cc | 2 +-
src/traffic_server/Makefile.inc | 1 +
src/traffic_server/traffic_server.cc | 14 +-
src/tscore/Makefile.am | 1 +
src/tscore/ink_cap.cc | 8 +-
src/tscore/unit_tests/test_Histogram.cc | 56 ++++
tests/Pipfile | 2 +-
.../gold_tests/autest-site/trafficserver.test.ext | 1 +
tests/gold_tests/dns/dns_host_down.test.py | 102 +++++++
.lgtm.yml => tests/gold_tests/dns/hosts_file | 28 +-
.../gold_tests/dns/replay/server_down.replay.yaml | 61 +++++
.../origin_connection/gold/two_503_congested.gold | 9 +
.../per_server_connection_max.test.py | 88 +++++-
.../pluginTest/s3_auth/gold/s3_auth_parsing.gold | 2 +-
.../pluginTest/slice/gold/slice_prefetch.gold | 15 +-
.../pluginTest/slice/slice_prefetch.test.py | 15 +-
.../pluginTest/traffic_dump/traffic_dump.test.py | 91 ++++++-
.../traffic_dump/traffic_dump_http3.test.py | 2 +-
.../traffic_dump/traffic_dump_sni_filter.test.py | 6 +-
tests/gold_tests/tls/ssl_multicert_loader.test.py | 3 +-
67 files changed, 1962 insertions(+), 644 deletions(-)
diff --cc mgmt/RecordsConfig.cc
index 829b7e967,0ad805de6..7e940c02a
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@@ -1498,9 -1557,19 +1498,22 @@@ static const RecordElement RecordsConfi
//# 0 - no checking. 1 - log in mismatch. 2 - enforcing
//#
//###########
- {RECT_CONFIG, "proxy.config.http.host_sni_policy", RECD_INT, "2", RECU_NULL, RR_NULL, RECC_NULL, "[0-2]", RECA_NULL},
+ {RECT_CONFIG, "proxy.config.http.host_sni_policy", RECD_INT, "2", RECU_NULL, RR_NULL, RECC_NULL, "[0-2]", RECA_NULL}
+ ,
+ {RECT_CONFIG, "proxy.config.jsonrpc.filename", RECD_STRING, ts::filename::JSONRPC, RECU_RESTART_TS, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
++ ,
+
+ //###########
+ //#
+ //# AIO specific configuration
+ //#
+ //###########
+ {RECT_CONFIG, "proxy.config.aio.io_uring.entries", RECD_INT, "1024", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL},
+ {RECT_CONFIG, "proxy.config.aio.io_uring.sq_poll_ms", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL},
+ {RECT_CONFIG, "proxy.config.aio.io_uring.attach_wq", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL},
+ {RECT_CONFIG, "proxy.config.aio.io_uring.wq_workers_bounded", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL},
+ {RECT_CONFIG, "proxy.config.aio.io_uring.wq_workers_unbounded", RECD_INT, "0", RECU_NULL, RR_NULL, RECC_NULL, nullptr, RECA_NULL},
+
};
// clang-format on
diff --cc tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py
index 7007cf19d,5c1aa6b2d..47644135e
--- a/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py
+++ b/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py
@@@ -317,3 -331,78 +331,78 @@@ tr.Processes.Default.Command =
tr.Processes.Default.ReturnCode = 0
tr.StillRunningAfter = server
tr.StillRunningAfter = ts
+
+ #
+ # Test 10: Verify that we can change the --limit value.
+ #
+ tr = Test.AddTestRun("Verify changing --limit via traffic_ctl.")
+ tr.Processes.Default.Command = "traffic_ctl plugin msg traffic_dump.limit 0"
+ tr.Processes.Default.ReturnCode = 0
+ tr.Processes.Default.Env = ts.Env
+ tr.StillRunningAfter = ts
+
+ tr = Test.AddTestRun("Run some more test traffic with the restricted disk limit.")
+ tr.AddVerifierClientProcess(
+ "client-2", replay_file, http_ports=[ts.Variables.port],
+ https_ports=[ts.Variables.ssl_port],
+ ssl_cert="ssl/server_combined.pem", ca_cert="ssl/signer.pem",
+ other_args='--keys 1')
+
+ # Since the limit is zero, we should not see any new replay file created.
+ tr = Test.AddTestRun("Verify no new traffic was dumped")
+ # Sleep 2 seconds to give the replay plugin plenty of time to write the file.
+ tr.Processes.Default.Command = "sleep 2"
+ tr.Processes.Default.ReturnCode = 0
+ file = tr.Disk.File(replay_file_session_12)
+ file.Exists = False
+
+ #
+ # Test 11: Verify that we can remove the disk limit.
+ #
+ tr = Test.AddTestRun("Removing the disk limit via traffic_ctl.")
-tr.Processes.Default.Command = "traffic_ctl plugin msg traffic_dump.unlimit"
++tr.Processes.Default.Command = "traffic_ctl plugin msg traffic_dump.unlimit 1"
+ tr.Processes.Default.ReturnCode = 0
+ tr.Processes.Default.Env = ts.Env
+ tr.StillRunningAfter = ts
+
+ tr = Test.AddTestRun("Run some more test traffic with no disk limit.")
+ tr.AddVerifierClientProcess(
+ "client-3", replay_file, http_ports=[ts.Variables.port],
+ https_ports=[ts.Variables.ssl_port],
+ ssl_cert="ssl/server_combined.pem", ca_cert="ssl/signer.pem",
+ other_args='--keys 1')
+
+ # Since the limit is zero, we should not see any new replay file created.
+ tr = Test.AddTestRun("Verify the new traffic was dumped")
+ # Sleep 2 seconds to give the replay plugin plenty of time to write the file.
+ tr.Processes.Default.Command = "sleep 2"
+ tr.Processes.Default.ReturnCode = 0
+ file = tr.Disk.File(replay_file_session_13)
+ file.Exists = True
+
+ #
+ # Test 11: Verify that we can again restrict the disk limit.
+ #
+ # Verify that the restriction can be re-added after unlimit was set. This
+ # verifies correct handling of the boolean controlling unlimited disk space.
+ #
+ tr = Test.AddTestRun("Verify re-adding --limit via traffic_ctl.")
+ tr.Processes.Default.Command = "traffic_ctl plugin msg traffic_dump.limit 0"
+ tr.Processes.Default.ReturnCode = 0
+ tr.Processes.Default.Env = ts.Env
+ tr.StillRunningAfter = ts
+
+ tr = Test.AddTestRun("Run test traffic with newly restricted disk limit.")
+ tr.AddVerifierClientProcess(
+ "client-4", replay_file, http_ports=[ts.Variables.port],
+ https_ports=[ts.Variables.ssl_port],
+ ssl_cert="ssl/server_combined.pem", ca_cert="ssl/signer.pem",
+ other_args='--keys 1')
+
+ # Since the limit is zero, we should not see any new replay file created.
+ tr = Test.AddTestRun("Verify no new traffic was dumped")
+ # Sleep 2 seconds to give the replay plugin plenty of time to write the file.
+ tr.Processes.Default.Command = "sleep 2"
+ tr.Processes.Default.ReturnCode = 0
+ file = tr.Disk.File(replay_file_session_14)
+ file.Exists = False
diff --cc tests/gold_tests/tls/ssl_multicert_loader.test.py
index cab532610,53cb1e733..fd5d25880
--- a/tests/gold_tests/tls/ssl_multicert_loader.test.py
+++ b/tests/gold_tests/tls/ssl_multicert_loader.test.py
@@@ -105,9 -106,9 +106,9 @@@ tr4.Processes.Default.Command = 'echo W
tr4.Processes.Default.ReturnCode = 0
tr4.Processes.Default.StartBefore(ts2)
-ts2.ReturnCode = 2
+ts2.ReturnCode = 70 # ink_fatal will exit with EX_SOFTWARE.
ts2.Ready = 0 # Need this to be 0 because we are testing shutdown, this is to make autest not think ats went away for a bad reason.
- ts.Disk.traffic_out.Content = Testers.ExcludesExpression(
+ ts2.Disk.traffic_out.Content = Testers.ExcludesExpression(
'Traffic Server is fully initialized',
'process should fail when invalid certificate specified')
ts2.Disk.diags_log.Content = Testers.IncludesExpression('FATAL: failed to load SSL certificate file', 'check diags.log"')