[trafficserver] branch quic-latest updated (e622acc -> 0462bb7)
This is an automated email from the ASF dual-hosted git repository. maskit pushed a change to branch quic-latest in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from e622acc Merge branch 'master' into quic-latest add 0462bb7 Add a setting for disable_active_migration Transport Parameter No new revisions were added by this update. Summary of changes: iocore/net/QUICNetVConnection.cc | 10 ++ iocore/net/quic/QUICConfig.cc| 7 +++ iocore/net/quic/QUICConfig.h | 2 ++ iocore/net/quic/QUICHandshake.cc | 3 +++ iocore/net/quic/QUICTypes.h | 1 + mgmt/RecordsConfig.cc| 2 ++ 6 files changed, 25 insertions(+)
[trafficserver] branch master updated: Fixed logging docs typos
This is an automated email from the ASF dual-hosted git repository. gancho pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 3d81f66 Fixed logging docs typos 3d81f66 is described below commit 3d81f660da9a5f8aca0f01e8ccb79db35aa72d3d Author: Gancho Tenev AuthorDate: Tue Mar 3 14:50:26 2020 -0800 Fixed logging docs typos Renamed the following references: -`proxy.config.output.logfile.rolling_max_count` +`proxy.config.log.rolling_max_count` -`proxy.config.output.logfile.rolling_allow_empty` +`proxy.config.log.rolling_allow_empty` --- doc/admin-guide/files/records.config.en.rst | 48 ++--- doc/admin-guide/logging/rotation.en.rst | 6 ++-- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index 14a9438..fd30913 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -273,30 +273,6 @@ System Variables order of auto-deletion (if enabled). A default value of 0 means auto-deletion will try to keep output logs as much as possible. See :doc:`../logging/rotation.en` for guidance. -.. ts:cv:: CONFIG proxy.config.output.logfile.rolling_max_count INT 0 - :reloadable: - - Specifies the maximum count of rolled output logs to keep. This value will be used by the - auto-deletion (if enabled) to trim the number of rolled log files every time the log is rolled. - A default value of 0 means auto-deletion will not try to limit the number of output logs. - See :doc:`../logging/rotation.en` for an use-case for this option. - -.. ts:cv:: CONFIG proxy.config.output.logfile.rolling_allow_empty INT 0 - :reloadable: - - While rolling default behavior is to rename, close and re-open the log file *only* when/if there is - something to log to the log file. This option opens a new log file right after rolling even if there - is nothing to log (i.e. nothing to be logged due to lack of requests to the server) - which may lead to 0-sized log files while rolling. See :doc:`../logging/rotation.en` for an use-case - for this option. - - = == - Value Description - = == - ``0`` No empty log files created and rolled if there was nothing to log - ``1`` Allow empty log files to be created and rolled even if there was nothing to log - = == - Thread Variables @@ -2872,6 +2848,30 @@ Logging Configuration order of auto-deletion (if enabled). A default value of 0 means auto-deletion will try to keep logs as much as possible. This value can be and should be overridden in logging.yaml. See :doc:`../logging/rotation.en` for guidance. +.. ts:cv:: CONFIG proxy.config.log.rolling_max_count INT 0 + :reloadable: + + Specifies the maximum count of rolled output logs to keep. This value will be used by the + auto-deletion (if enabled) to trim the number of rolled log files every time the log is rolled. + A default value of 0 means auto-deletion will not try to limit the number of output logs. + See :doc:`../logging/rotation.en` for an use-case for this option. + +.. ts:cv:: CONFIG proxy.config.log.rolling_allow_empty INT 0 + :reloadable: + + While rolling default behavior is to rename, close and re-open the log file *only* when/if there is + something to log to the log file. This option opens a new log file right after rolling even if there + is nothing to log (i.e. nothing to be logged due to lack of requests to the server) + which may lead to 0-sized log files while rolling. See :doc:`../logging/rotation.en` for an use-case + for this option. + + = == + Value Description + = == + ``0`` No empty log files created and rolled if there was nothing to log + ``1`` Allow empty log files to be created and rolled even if there was nothing to log + = == + .. ts:cv:: CONFIG proxy.config.log.auto_delete_rolled_files INT 1 :reloadable: diff --git a/doc/admin-guide/logging/rotation.en.rst b/doc/admin-guide/logging/rotation.en.rst index 6dad554..e0b93c2 100644 --- a/doc/admin-guide/logging/rotation.en.rst +++ b/doc/admin-guide/logging/rotation.en.rst @@ -255,13 +255,13 @@ the maximum number of rolled log files, and forcing |TS| to roll even when there Let us say we wanted the oldest log entry to be kept on the box to be no older than 2-hour old. -Set :ts:cv:`pro
[trafficserver] branch master updated (91a8ef4 -> 7f30e24)
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 91a8ef4 Remove --read_core option add 853b010 Add more flexible error handling when open a config file. add 094fbbe Fix clang-format on SSLUtils.cc add 7f30e24 Use same filename variable to keep consistency No new revisions were added by this update. Summary of changes: iocore/cache/CacheHosting.cc| 47 +++-- iocore/dns/SplitDNS.cc | 3 +-- iocore/net/SSLUtils.cc | 26 +-- proxy/ControlMatcher.cc | 24 +++-- proxy/http/remap/RemapConfig.cc | 18 +++- 5 files changed, 69 insertions(+), 49 deletions(-)
[trafficserver] branch master updated: Remove --read_core option
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 91a8ef4 Remove --read_core option 91a8ef4 is described below commit 91a8ef4010d023867c7baa74523c3bd9f8a23f06 Author: Susan Hinrichs AuthorDate: Tue Mar 3 20:52:53 2020 + Remove --read_core option --- doc/appendices/command-line/traffic_server.en.rst | 2 - src/traffic_server/CoreUtils.cc | 911 -- src/traffic_server/CoreUtils.h| 198 - src/traffic_server/Makefile.inc | 2 - src/traffic_server/traffic_server.cc | 12 - 5 files changed, 1125 deletions(-) diff --git a/doc/appendices/command-line/traffic_server.en.rst b/doc/appendices/command-line/traffic_server.en.rst index 5abd3f4..48b3e47 100644 --- a/doc/appendices/command-line/traffic_server.en.rst +++ b/doc/appendices/command-line/traffic_server.en.rst @@ -36,8 +36,6 @@ Options .. option:: -B TAGS, --action_tags TAGS -.. option:: -c CORE, --read_core CORE - .. option:: -C 'CMD [ARGS]', --command 'CMD [ARGS]' Run a |TS| maintenance command. These commands perform various administrative diff --git a/src/traffic_server/CoreUtils.cc b/src/traffic_server/CoreUtils.cc deleted file mode 100644 index ef3d9be..000 --- a/src/traffic_server/CoreUtils.cc +++ /dev/null @@ -1,911 +0,0 @@ -/** @file - - A brief file description - - @section license License - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -/ - - CoreUtils.cc - - Description: Automated processing of core files on Linux - / - -/* - Stack Unwinding procedure on ix86 architecture on Linux : - Get the first frame pointer in $ebp. - The value stored in $ebp is the address of prev frame pointer. - Keep on unwinding till it is Ox0. - $ebp+4 in each frame represents $eip.(PC) -*/ - -/* - * Accessing arguments on 386 : - * - * We need to start from $ebp+4 and then keep on reading args - * till we reach the base pointer for prev. frame - * - * - *(high memory) - *+ + - *| Callers Stack Frame | - *+-+ - *| function call | - *| arguments | - *+-+ - *| Return Address+ - *+ + - *|Old base pointer + Base pointer BP - *+ + - *| | - *| | - *| | Local (automatic) variables - *| | - *| | - *| | - *| | - *| | - *| | - *+-+ Stack pointer SP - *| free stack | (low memory, top of the stack) - *|begins here | - *+ + - * - * - * +-+ +-+ - * FP -> | previous FP > | previous FP -->... - * | | | | - *| return address | | return address | - *+-+ +-+ - */ - -/* 32-bit arguments are pushed down stack in reverse syntactic order (hence accessed/popped in the right order), above the 32-bit - * near return address. %ebp, %esi, %edi, %ebx are callee-saved, other registers are caller-saved; %eax is to hold the result, or - * %edx:%eax for 64-bit results */ - -/*has -fomit-frame-pointer has any repercussions?? - We assume that all the code is generated with frame pointers set. */ - -/* modify the "note" in process_core */ -/* Document properly */ - -#include "tscore/ink_config.h" - -#if defined(linux) -#include "CoreUtils.h" - -#define __p_type p_type // ugly hack? - see resolv.h -#define D(x) x /* for debugging */ -intptr_t f1, f2; -int framepointer= 0; -int program_counter = 0; -#endif //
[trafficserver] branch master updated: Remove noisy mutex warning
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new ff7546e Remove noisy mutex warning ff7546e is described below commit ff7546ee8a901c2152bd9054ca1653c57b69409a Author: Susan Hinrichs AuthorDate: Tue Mar 3 20:57:35 2020 + Remove noisy mutex warning --- iocore/eventsystem/UnixEThread.cc | 6 -- 1 file changed, 6 deletions(-) diff --git a/iocore/eventsystem/UnixEThread.cc b/iocore/eventsystem/UnixEThread.cc index 332ca14..06c9943 100644 --- a/iocore/eventsystem/UnixEThread.cc +++ b/iocore/eventsystem/UnixEThread.cc @@ -120,12 +120,6 @@ EThread::process_event(Event *e, int calling_code) return; } Continuation *c_temp = e->continuation; -// Make sure that the continuation is locked before calling the handler - -// Give a heads up if we are processing through a continuation without a mutex -if (!e->mutex) { - Warning("event processing for continuation %s without a mutex", typeid(*c_temp).name()); -} // Restore the client IP debugging flags set_cont_flags(e->continuation->control_flags);
[trafficserver] 02/02: AUTest MakeATSProcess default ports records.config
This is an automated email from the ASF dual-hosted git repository. acanary pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 3bf707b170af882e9112eed8721fce6bfd3f3d31 Author: Aaron Canary AuthorDate: Mon Mar 2 14:26:15 2020 -0600 AUTest MakeATSProcess default ports records.config I'm initializing the records.config/proxy.config.http.server_ports value instead of the PROXY_CONFIG_HTTP_SERVER_PORTS environment variable in hopes simplify most autest setup logic. If you need custom ports or alpn, just update the records.config to what you want. --- tests/gold_tests/autest-site/trafficserver.test.ext | 20 tests/gold_tests/h2/h2enable.test.py| 21 - .../h2/h2enable_no_accept_threads.test.py | 15 --- tests/gold_tests/h2/h2spec.test.py | 3 +-- tests/gold_tests/headers/cachedIMSRange.test.py | 2 +- tests/gold_tests/headers/forwarded.test.py | 17 + tests/gold_tests/headers/via.test.py| 7 +++ tests/gold_tests/logging/new_log_flds.test.py | 4 +--- .../pluginTest/cert_update/cert_update.test.py | 12 +--- .../pluginTest/regex_remap/regex_remap.test.py | 3 +-- .../pluginTest/sslheaders/sslheaders.test.py| 8 tests/gold_tests/remap/remap_https.test.py | 2 +- tests/gold_tests/remap/remap_ws.test.py | 3 +-- tests/gold_tests/tls/tls_0rtt_server.test.py| 3 +-- .../gold_tests/tls/tls_check_cert_selection.test.py | 15 +-- 15 files changed, 65 insertions(+), 70 deletions(-) diff --git a/tests/gold_tests/autest-site/trafficserver.test.ext b/tests/gold_tests/autest-site/trafficserver.test.ext index 423af0f..779f183 100755 --- a/tests/gold_tests/autest-site/trafficserver.test.ext +++ b/tests/gold_tests/autest-site/trafficserver.test.ext @@ -63,7 +63,7 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True, enabl p = obj.Processes.Process(name, command) #p_debug = obj.Processes.Process("port-debug", "ss --listen --tcp --process") #p_debug.Env['PATH'] = "/usr/sbin" + os.pathsep + p.ComposeEnv()['PATH'] -#p.StartBefore(p_debug) +# p.StartBefore(p_debug) # we want to have a few directories more fixed # this helps with debugging as location are common # we do this by overiding locations from the "layout" @@ -270,11 +270,13 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True, enabl if enable_tls: get_port(p, "ssl_port") get_port(p, "ssl_portv6") -# p.Ready = When.PortOpen(p.Variables.port) else: p.Variables.port = 8080 p.Variables.portv6 = 8080 -p.Variables.ssl_port = 4443 + +if enable_tls: +p.Variables.ssl_port = 4443 +p.Variables.ssl_portv6 = get_port(p, "manager_port") get_port(p, "admin_port") @@ -284,14 +286,16 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True, enabl else: p.Ready = When.PortOpen(p.Variables.port) -# set the ports if select_ports: +# default config port_str = "{port} {v6_port}:ipv6 ".format(port=p.Variables.port, v6_port=p.Variables.portv6) - if enable_tls: -port_str += "{ssl_port}:ssl {ssl_portv6}:ssl:ipv6".format(ssl_port=p.Variables.ssl_port,ssl_portv6=p.Variables.ssl_portv6) - -p.Env['PROXY_CONFIG_HTTP_SERVER_PORTS'] = port_str +port_str += "{ssl_port}:ssl {ssl_portv6}:ssl:ipv6".format( +ssl_port=p.Variables.ssl_port, ssl_portv6=p.Variables.ssl_portv6) +#p.Env['PROXY_CONFIG_HTTP_SERVER_PORTS'] = port_str +p.Disk.records_config.update({ +'proxy.config.http.server_ports': port_str, +}) p.Env['PROXY_CONFIG_PROCESS_MANAGER_MGMT_PORT'] = str( p.Variables.manager_port) diff --git a/tests/gold_tests/h2/h2enable.test.py b/tests/gold_tests/h2/h2enable.test.py index a44c271..cb6658b 100644 --- a/tests/gold_tests/h2/h2enable.test.py +++ b/tests/gold_tests/h2/h2enable.test.py @@ -26,7 +26,7 @@ Test.SkipUnless( ) # Define default ATS -ts = Test.MakeATSProcess("ts", select_ports=False, enable_tls=True) +ts = Test.MakeATSProcess("ts", enable_tls=True) server = Test.MakeOriginServer("server") request_header = {"headers": "GET / HTTP/1.1\r\n\r\n", "timestamp": "1469733493.993", "body": ""} @@ -57,15 +57,16 @@ ts.Disk.records_config.update({ }) ts.Disk.sni_yaml.AddLines([ - 'sni:', - '- fqdn: bar.com', - ' http2: on', - '- fqdn: bob.*.com', - ' http2: on', +'sni:', +'- fqdn: bar.com', +' http2: on', +'- fqdn: bob.*.com', +' http2: on', ]) tr = Test.AddTestRun("Do-not-Negotiate-h2") -tr.Processes.Default.Command = "curl -v -k --resolve 'foo.com:{0}:127.0.0.1' https://foo.com
[trafficserver] 01/02: Using dynamic ports in AUtest
This is an automated email from the ASF dual-hosted git repository. acanary pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit f3ed27f969f7b3a6766a5c0e0b63f85b07897fe3 Author: Aaron Canary AuthorDate: Tue Feb 25 12:47:17 2020 -0600 Using dynamic ports in AUtest This resolves "failed to reserve port" failures. --- tests/gold_tests/h2/h2spec.test.py | 1 - tests/gold_tests/headers/forwarded.test.py | 9 tests/gold_tests/headers/via.test.py | 1 - .../pluginTest/cert_update/cert_update.test.py | 26 +- tests/gold_tests/remap/remap_https.test.py | 7 +++--- .../tls/tls_check_cert_selection.test.py | 1 - tests/gold_tests/tls/tls_forward_nonhttp.test.py | 19 ++-- 7 files changed, 35 insertions(+), 29 deletions(-) diff --git a/tests/gold_tests/h2/h2spec.test.py b/tests/gold_tests/h2/h2spec.test.py index 7bb7fd4..206e58a 100644 --- a/tests/gold_tests/h2/h2spec.test.py +++ b/tests/gold_tests/h2/h2spec.test.py @@ -40,7 +40,6 @@ ts = Test.MakeATSProcess("ts", select_ports=False) ts.addSSLfile("ssl/server.pem") ts.addSSLfile("ssl/server.key") -ts.Variables.ssl_port = 4443 ts.Disk.remap_config.AddLine( 'map / http://127.0.0.1:{0}'.format(httpbin.Variables.Port) ) diff --git a/tests/gold_tests/headers/forwarded.test.py b/tests/gold_tests/headers/forwarded.test.py index 5fed205..fcc7760 100644 --- a/tests/gold_tests/headers/forwarded.test.py +++ b/tests/gold_tests/headers/forwarded.test.py @@ -18,6 +18,7 @@ Test the Forwarded header and related configuration.. # limitations under the License. import os +import ports Test.Summary = ''' Test FORWARDED header. @@ -77,12 +78,12 @@ forwarded_log_id = Test.Disk.File("forwarded.log") forwarded_log_id.Content = "forwarded.gold" -def baselineTsSetup(ts, sslPort): +def baselineTsSetup(ts): ts.addSSLfile("../remap/ssl/server.pem") ts.addSSLfile("../remap/ssl/server.key") -ts.Variables.ssl_port = sslPort +ports.get_port(ts, 'ssl_port') ts.Disk.records_config.update({ # 'proxy.config.diags.debug.enabled': 1, @@ -107,7 +108,7 @@ def baselineTsSetup(ts, sslPort): ts = Test.MakeATSProcess("ts", select_ports=False) -baselineTsSetup(ts, 4443) +baselineTsSetup(ts) ts.Disk.remap_config.AddLine( 'map http://www.forwarded-none.com http://127.0.0.1:{0}'.format(server.Variables.Port) + @@ -201,7 +202,7 @@ ts2 = Test.MakeATSProcess("ts2", command="traffic_manager", select_ports=False) ts2.Variables.port += 1 -baselineTsSetup(ts2, ) +baselineTsSetup(ts2) ts2.Disk.records_config.update({ 'proxy.config.url_remap.pristine_host_hdr': 1, # Retain Host header in original incoming client request. diff --git a/tests/gold_tests/headers/via.test.py b/tests/gold_tests/headers/via.test.py index 5e275d1..28938c2 100644 --- a/tests/gold_tests/headers/via.test.py +++ b/tests/gold_tests/headers/via.test.py @@ -45,7 +45,6 @@ server.addResponse("sessionlog.json", request_header, response_header) ts.addSSLfile("../remap/ssl/server.pem") ts.addSSLfile("../remap/ssl/server.key") -ts.Variables.ssl_port = 4443 ts.Disk.records_config.update({ 'proxy.config.http.insert_request_via_str': 4, 'proxy.config.http.insert_response_via_str': 4, diff --git a/tests/gold_tests/pluginTest/cert_update/cert_update.test.py b/tests/gold_tests/pluginTest/cert_update/cert_update.test.py index 0e2beb4..7c1dc17 100644 --- a/tests/gold_tests/pluginTest/cert_update/cert_update.test.py +++ b/tests/gold_tests/pluginTest/cert_update/cert_update.test.py @@ -17,13 +17,15 @@ Test the cert_update plugin. # See the License for the specific language governing permissions and # limitations under the License. +import ports + Test.Summary = ''' Test cert_update plugin. ''' Test.SkipUnless( -Condition.HasProgram("openssl","Openssl need to be installed on system for this test to work") -) +Condition.HasProgram("openssl", "Openssl need to be installed on system for this test to work") +) # Set up origin server server = Test.MakeOriginServer("server") @@ -41,9 +43,8 @@ ts.addSSLfile("ssl/server2.pem") ts.addSSLfile("ssl/client1.pem") ts.addSSLfile("ssl/client2.pem") -# Setup ssl ports -ts.Variables.ssl_port = 4443 -s_server_port = 12345 +# reserve port, attach it to 'ts' so it is released later +ports.get_port(ts, 's_server_port') ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, @@ -63,7 +64,7 @@ ts.Disk.ssl_multicert_config.AddLine( ts.Disk.remap_config.AddLines([ 'map https://bar.com http://127.0.0.1:{0}'.format(server.Variables.Port), -'map https://foo.com https://127.0.0.1:{0}'.format(s_server_port) +'map https://foo.com https://127.0.0.1:{0}'.format(ts.Variables.s_server_port) ]) ts.Disk.sni_yaml.AddLines([ @@ -108,8 +109,9 @@ ts.StillRunningAfter = server # Client-Cert-P
[trafficserver] branch master updated (889e0fa -> 3bf707b)
This is an automated email from the ASF dual-hosted git repository. acanary pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 889e0fa Issue #6400 - Adds config option to enable/disable dynamic reload feature for plugins => proxy.config.plugin.dynamic_reload_mode - 1 (default) enables the dynamic reload feature, 0 disables it => Adds to and refactors unit-tests for the dynamic plugin reload feature new f3ed27f Using dynamic ports in AUtest new 3bf707b AUTest MakeATSProcess default ports records.config The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../gold_tests/autest-site/trafficserver.test.ext | 20 +++- tests/gold_tests/h2/h2enable.test.py | 21 +++- .../h2/h2enable_no_accept_threads.test.py | 15 + tests/gold_tests/h2/h2spec.test.py | 4 +-- tests/gold_tests/headers/cachedIMSRange.test.py| 2 +- tests/gold_tests/headers/forwarded.test.py | 24 +- tests/gold_tests/headers/via.test.py | 8 ++--- tests/gold_tests/logging/new_log_flds.test.py | 4 +-- .../pluginTest/cert_update/cert_update.test.py | 38 -- .../pluginTest/regex_remap/regex_remap.test.py | 3 +- .../pluginTest/sslheaders/sslheaders.test.py | 8 ++--- tests/gold_tests/remap/remap_https.test.py | 9 +++-- tests/gold_tests/remap/remap_ws.test.py| 3 +- tests/gold_tests/tls/tls_0rtt_server.test.py | 3 +- .../tls/tls_check_cert_selection.test.py | 16 + tests/gold_tests/tls/tls_forward_nonhttp.test.py | 19 +++ 16 files changed, 99 insertions(+), 98 deletions(-)
[trafficserver] branch master updated (6e955a8 -> 889e0fa)
This is an automated email from the ASF dual-hosted git repository. sudheerv pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from 6e955a8 cache_range_requests plugin: detect and handle TSCacheUrlSet failures which poison the cache (#6464) add 889e0fa Issue #6400 - Adds config option to enable/disable dynamic reload feature for plugins => proxy.config.plugin.dynamic_reload_mode - 1 (default) enables the dynamic reload feature, 0 disables it => Adds to and refactors unit-tests for the dynamic plugin reload feature No new revisions were added by this update. Summary of changes: doc/admin-guide/files/records.config.en.rst| 5 + .../design-documents/reloading-plugins.en.rst | 6 + mgmt/RecordsConfig.cc | 2 + proxy/Plugin.cc| 27 + proxy/Plugin.h | 12 + proxy/http/remap/PluginDso.cc | 38 +- proxy/http/remap/PluginDso.h | 6 +- proxy/http/remap/PluginFactory.cc | 32 +- proxy/http/remap/PluginFactory.h | 4 +- proxy/http/remap/RemapConfig.cc| 3 +- .../http/remap/unit-tests/plugin_testing_common.cc | 21 + .../http/remap/unit-tests/plugin_testing_common.h | 4 + proxy/http/remap/unit-tests/test_PluginFactory.cc | 583 ++--- src/traffic_server/traffic_server.cc | 2 + 14 files changed, 644 insertions(+), 101 deletions(-)
[trafficserver] branch master updated: cache_range_requests plugin: detect and handle TSCacheUrlSet failures which poison the cache (#6464)
This is an automated email from the ASF dual-hosted git repository. eze pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/master by this push: new 6e955a8 cache_range_requests plugin: detect and handle TSCacheUrlSet failures which poison the cache (#6464) 6e955a8 is described below commit 6e955a8a8a28a142c72a7c65576c0d19b8db2570 Author: Brian Olsen AuthorDate: Tue Mar 3 11:18:25 2020 -0700 cache_range_requests plugin: detect and handle TSCacheUrlSet failures which poison the cache (#6464) --- .../plugins/cache_range_requests.en.rst| 31 +- .../cache_range_requests/cache_range_requests.cc | 20 +++- ...st.py => cache_range_requests_cachekey.test.py} | 113 - .../cache_range_requests_ims.test.py | 2 +- 4 files changed, 128 insertions(+), 38 deletions(-) diff --git a/doc/admin-guide/plugins/cache_range_requests.en.rst b/doc/admin-guide/plugins/cache_range_requests.en.rst index 5d33f7c..6d11d21 100644 --- a/doc/admin-guide/plugins/cache_range_requests.en.rst +++ b/doc/admin-guide/plugins/cache_range_requests.en.rst @@ -137,6 +137,29 @@ In order for this to properly work in a CDN each cache in the chain *SHOULD* also contain a remap rule with the :program:`cache_range_requests` plugin with this option set. +Don't modify the Cache Key +-- + +.. option:: --no-modify-cachekey +.. option:: -n + +With each transaction TSCacheUrlSet may only be called once. When +using the `cache_range_requests` plugin in conjunction with the +`cachekey` plugin the option `--include-headers=Range` should be +added as a `cachekey` parameter with this option. Configuring this +incorrectly *WILL* result in cache poisoning. + +.. code:: + + map http://ats/ http://parent/ \ + @plugin=cachekey.so @pparam=--include-headers=Range \ + @plugin=cache_range_requests.so @pparam=--no-modify-cachekey + +*Without this `cache_range_requests` plugin option* + +*IF* the TSCacheUrlSet call in cache_range_requests fails, an error is +generated in the logs and the cache_range_requests plugin will disable +transaction caching in order to avoid cache poisoning. Configuration examples == @@ -146,23 +169,23 @@ Global plugin .. code:: -cache_range_requests.so --ps-cachekey --consider-ims +cache_range_requests.so --ps-cachekey --consider-ims --no-modify-cachekey or .. code:: -cache_range_requests.so -p -c +cache_range_requests.so -p -c -n Remap plugin .. code:: -map http://ats http://parent @plugin=cache_range_requests.so @pparam=--ps-cachekey @pparam=--consider-ims +map http://ats http://parent @plugin=cache_range_requests.so @pparam=--ps-cachekey @pparam=--consider-ims @pparam=--no-modify-cachekey or .. code:: -map http://ats http://parent @plugin=cache_range_requests.so @pparam=-p @pparam=-c +map http://ats http://parent @plugin=cache_range_requests.so @pparam=-p @pparam=-c @pparam=-n diff --git a/plugins/cache_range_requests/cache_range_requests.cc b/plugins/cache_range_requests/cache_range_requests.cc index 13381d2..41a7702 100644 --- a/plugins/cache_range_requests/cache_range_requests.cc +++ b/plugins/cache_range_requests/cache_range_requests.cc @@ -49,6 +49,7 @@ typedef enum parent_select_mode { struct pluginconfig { parent_select_mode_t ps_mode{PS_DEFAULT}; bool consider_ims_header{false}; + bool modify_cache_key{true}; }; struct txndata { @@ -96,6 +97,7 @@ create_pluginconfig(int argc, char *const argv[]) static const struct option longopts[] = { {const_cast("ps-cachekey"), no_argument, nullptr, 'p'}, {const_cast("consider-ims"), no_argument, nullptr, 'c'}, +{const_cast("no-modify-cachekey"), no_argument, nullptr, 'n'}, {nullptr, 0, nullptr, 0}, }; @@ -118,6 +120,10 @@ create_pluginconfig(int argc, char *const argv[]) DEBUG_LOG("Plugin considers the '%.*s' header", (int)X_IMS_HEADER.size(), X_IMS_HEADER.data()); pc->consider_ims_header = true; } break; +case 'n': { + DEBUG_LOG("Plugin doesn't modify cache key"); + pc->modify_cache_key = false; +} break; default: { } break; } @@ -203,12 +209,16 @@ range_header_check(TSHttpTxn txnp, pluginconfig *const pc) TSfree(req_url); } - // set the cache key. - if (TS_SUCCESS != TSCacheUrlSet(txnp, cache_key_url, cache_key_url_length)) { -DEBUG_LOG("failed to change the cache url to %s.", cache_key_url); - } - if (nullptr != pc) { +// set the cache key if configured to. +if (pc->modify_cache_key && TS_SUCCESS != TSCacheUrlSet(txnp, cache_key_url, cache_key_url_length)) { + ERROR_LOG("failed to change the cache url to %s.", cache_key_url); + ERROR_LOG("Disabling cach
[trafficserver] branch master updated (f5efd76 -> b118bd9)
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from f5efd76 make sure time is consistent between calculations new 9074db0 Make traffic_manager be flexible when opening config files. new b118bd9 Fix clang-format The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: mgmt/ConfigManager.cc | 14 +++-- mgmt/ConfigManager.h | 10 - mgmt/FileManager.cc | 12 ++- mgmt/FileManager.h| 8 +--- src/traffic_manager/AddConfigFilesHere.cc | 34 --- 5 files changed, 47 insertions(+), 31 deletions(-)
[trafficserver] 01/02: Make traffic_manager be flexible when opening config files.
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit 9074db07b86f249dab9c3a5a8809ffb6318912cd Author: Damian Meden AuthorDate: Thu Feb 27 13:34:34 2020 + Make traffic_manager be flexible when opening config files. --- mgmt/ConfigManager.cc | 13 ++-- mgmt/ConfigManager.h | 9 +++- mgmt/FileManager.cc | 11 +- mgmt/FileManager.h| 7 --- src/traffic_manager/AddConfigFilesHere.cc | 35 +-- 5 files changed, 44 insertions(+), 31 deletions(-) diff --git a/mgmt/ConfigManager.cc b/mgmt/ConfigManager.cc index 1eb94aa..b2dfe79 100644 --- a/mgmt/ConfigManager.cc +++ b/mgmt/ConfigManager.cc @@ -42,8 +42,8 @@ #define TS_ARCHIVE_STAT_MTIME(t) ((t).st_mtime * 10) #endif -ConfigManager::ConfigManager(const char *fileName_, const char *configName_, bool root_access_needed_, ConfigManager *parentConfig_) - : root_access_needed(root_access_needed_), parentConfig(parentConfig_) +ConfigManager::ConfigManager(const char *fileName_, const char *configName_, bool root_access_needed_, bool isRequired_, ConfigManager *parentConfig_) + : root_access_needed(root_access_needed_), isRequired(isRequired_), parentConfig(parentConfig_) { ExpandingArray existVer(25, true); // Existing versions struct stat fileInfo; @@ -59,14 +59,15 @@ ConfigManager::ConfigManager(const char *fileName_, const char *configName_, boo configName = ats_strdup(configName_); ink_mutex_init(&fileAccessLock); - // Check to make sure that our configuration file exists // if (statFile(&fileInfo) < 0) { -// If we can't find an active version because there is none we have a hard failure. -mgmt_fatal(0, "[ConfigManager::ConfigManager] Unable to find configuration file %s.\n\tStat failed : %s\n", fileName, - strerror(errno)); +mgmt_log("[ConfigManager::ConfigManager] %s Unable to load: %s", fileName, strerror(errno)); +if (isRequired) { + mgmt_fatal(0, "[ConfigManager::ConfigManager] Unable to open required configuration file %s.\n\tStat failed : %s\n", fileName, + strerror(errno)); +} } else { fileLastModified = TS_ARCHIVE_STAT_MTIME(fileInfo); } diff --git a/mgmt/ConfigManager.h b/mgmt/ConfigManager.h index f32cb2a..f7b3e3e 100644 --- a/mgmt/ConfigManager.h +++ b/mgmt/ConfigManager.h @@ -54,7 +54,7 @@ class ConfigManager { public: // fileName_ should be rooted or a base file name. - ConfigManager(const char *fileName_, const char *configName_, bool root_access_needed, ConfigManager *parentConfig_); + ConfigManager(const char *fileName_, const char *configName_, bool root_access_needed, bool isRequired_, ConfigManager *parentConfig_); ~ConfigManager(); // Manual take out of lock required @@ -104,6 +104,12 @@ public: return root_access_needed; } + bool + getIsRequired() const + { +return isRequired; + } + FileManager *configFiles = nullptr; // Manager to notify on an update. // noncopyable @@ -117,6 +123,7 @@ private: char *fileName; char *configName; bool root_access_needed; + bool isRequired; ConfigManager *parentConfig; time_t fileLastModified = 0; }; diff --git a/mgmt/FileManager.cc b/mgmt/FileManager.cc index c23f17f..e38f6d3 100644 --- a/mgmt/FileManager.cc +++ b/mgmt/FileManager.cc @@ -92,20 +92,21 @@ FileManager::registerCallback(FileCallbackFunc func) // Pointers to the new objects are stored in the bindings hashtable // void -FileManager::addFile(const char *fileName, const char *configName, bool root_access_needed, ConfigManager *parentConfig) +FileManager::addFile(const char *fileName, const char *configName, bool root_access_needed, bool isRequired, + ConfigManager *parentConfig) { ink_mutex_acquire(&accessLock); - addFileHelper(fileName, configName, root_access_needed, parentConfig); + addFileHelper(fileName, configName, root_access_needed, isRequired, parentConfig); ink_mutex_release(&accessLock); } // caller must hold the lock void -FileManager::addFileHelper(const char *fileName, const char *configName, bool root_access_needed, ConfigManager *parentConfig) +FileManager::addFileHelper(const char *fileName, const char *configName, bool root_access_needed, bool isRequired, ConfigManager *parentConfig) { ink_assert(fileName != nullptr); - ConfigManager *rb = new ConfigManager(fileName, configName, root_access_needed, parentConfig); + ConfigManager *rb = new ConfigManager(fileName, configName, root_access_needed, isRequired, parentConfig); rb->configFiles = this; bindings.emplace(rb->getFileName(), rb); @@ -257,7 +258,7 @@ FileManager::configFileChild(const char *parent, const char *child) ink_mutex_acquire(&accessLock); if (auto it = bi
[trafficserver] 02/02: Fix clang-format
This is an automated email from the ASF dual-hosted git repository. shinrich pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git commit b118bd96b8966208e2c5306a199bee97c8b5b501 Author: Damian Meden AuthorDate: Fri Feb 28 10:24:10 2020 + Fix clang-format --- mgmt/ConfigManager.cc | 5 +++-- mgmt/ConfigManager.h | 3 ++- mgmt/FileManager.cc | 3 ++- mgmt/FileManager.h| 3 ++- src/traffic_manager/AddConfigFilesHere.cc | 5 ++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/mgmt/ConfigManager.cc b/mgmt/ConfigManager.cc index b2dfe79..19304e0 100644 --- a/mgmt/ConfigManager.cc +++ b/mgmt/ConfigManager.cc @@ -42,8 +42,9 @@ #define TS_ARCHIVE_STAT_MTIME(t) ((t).st_mtime * 10) #endif -ConfigManager::ConfigManager(const char *fileName_, const char *configName_, bool root_access_needed_, bool isRequired_, ConfigManager *parentConfig_) - : root_access_needed(root_access_needed_), isRequired(isRequired_), parentConfig(parentConfig_) +ConfigManager::ConfigManager(const char *fileName_, const char *configName_, bool root_access_needed_, bool isRequired_, + ConfigManager *parentConfig_) + : root_access_needed(root_access_needed_), isRequired(isRequired_), parentConfig(parentConfig_) { ExpandingArray existVer(25, true); // Existing versions struct stat fileInfo; diff --git a/mgmt/ConfigManager.h b/mgmt/ConfigManager.h index f7b3e3e..b10a9ae 100644 --- a/mgmt/ConfigManager.h +++ b/mgmt/ConfigManager.h @@ -54,7 +54,8 @@ class ConfigManager { public: // fileName_ should be rooted or a base file name. - ConfigManager(const char *fileName_, const char *configName_, bool root_access_needed, bool isRequired_, ConfigManager *parentConfig_); + ConfigManager(const char *fileName_, const char *configName_, bool root_access_needed, bool isRequired_, +ConfigManager *parentConfig_); ~ConfigManager(); // Manual take out of lock required diff --git a/mgmt/FileManager.cc b/mgmt/FileManager.cc index e38f6d3..fce09a0 100644 --- a/mgmt/FileManager.cc +++ b/mgmt/FileManager.cc @@ -102,7 +102,8 @@ FileManager::addFile(const char *fileName, const char *configName, bool root_acc // caller must hold the lock void -FileManager::addFileHelper(const char *fileName, const char *configName, bool root_access_needed, bool isRequired, ConfigManager *parentConfig) +FileManager::addFileHelper(const char *fileName, const char *configName, bool root_access_needed, bool isRequired, + ConfigManager *parentConfig) { ink_assert(fileName != nullptr); diff --git a/mgmt/FileManager.h b/mgmt/FileManager.h index 8d9a899..64725b6 100644 --- a/mgmt/FileManager.h +++ b/mgmt/FileManager.h @@ -94,7 +94,8 @@ private: ink_mutex cbListLock; // Protects the CallBack List DLL cblist; std::unordered_map bindings; - void addFileHelper(const char *fileName, const char *configName, bool root_access_needed, bool isRequired, ConfigManager *parentConfig); + void addFileHelper(const char *fileName, const char *configName, bool root_access_needed, bool isRequired, + ConfigManager *parentConfig); }; void initializeRegistry(); // implemented in AddConfigFilesHere.cc diff --git a/src/traffic_manager/AddConfigFilesHere.cc b/src/traffic_manager/AddConfigFilesHere.cc index 1f9d2da..3fdf572 100644 --- a/src/traffic_manager/AddConfigFilesHere.cc +++ b/src/traffic_manager/AddConfigFilesHere.cc @@ -29,9 +29,8 @@ extern FileManager *configFiles; - -static constexpr bool REQUIRED { true }; -static constexpr bool NOT_REQUIRED { false }; +static constexpr bool REQUIRED{true}; +static constexpr bool NOT_REQUIRED{false}; / * * AddConfigFilesHere.cc - Structs for config files and
[trafficserver] branch master updated (deea85a -> f5efd76)
This is an automated email from the ASF dual-hosted git repository. duke8253 pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from deea85a Remove update to unused variable add f5efd76 make sure time is consistent between calculations No new revisions were added by this update. Summary of changes: iocore/eventsystem/UnixEThread.cc | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-)