[trafficserver] branch 9.2.x updated: Updated ChangeLog

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new 2f32d81  Updated ChangeLog
2f32d81 is described below

commit 2f32d8125124033c608f89b4ca36386c5c7823c3
Author: Leif Hedstrom 
AuthorDate: Wed Oct 13 17:00:24 2021 -0600

Updated ChangeLog
---
 CHANGELOG-9.2.0 | 9 +
 1 file changed, 9 insertions(+)

diff --git a/CHANGELOG-9.2.0 b/CHANGELOG-9.2.0
index 473d7ab..5a4f2ae 100644
--- a/CHANGELOG-9.2.0
+++ b/CHANGELOG-9.2.0
@@ -301,10 +301,19 @@ Changes with Apache Traffic Server 9.2.0
   #8348 - remove unused RecConfigFileEntry from RecConfigParse
   #8354 - Adds support for TCP_NOTSENT_LOWAT sockopt
   #8358 - Locking around SSLSecret::secret_map access
+  #8359 - Fix regex_remap plugin redirection.
   #8360 - Stabilize regex_revalidate Au test.
   #8363 - Added support for promoting internal (plugin-initiated) requests.
   #8364 - Added support for verifying cacheability before attempting to force 
an object into cache.
   #8365 - Fixes issue #8329 crash in NextHopConsistentHash
   #8370 - Traffic Dump: update json-schema for new tuple requirements
+  #8372 - Add Au test for pqsi and pqsp log fields.
   #8373 - Removed references to the throttle option from the slice plugin.
   #8374 - 9.2.x autest fixes
+  #8381 - Fix a potential H2 stall
+  #8388 - body factory does not respect runroot
+  #8392 - Update the feature lists available for autest
+  #8405 - Update CacheWrite.cc
+  #8406 - Fix map_with_recv_port URL remapping type.
+  #8409 - Add stats for concurrent stream limits exceeded
+  #8412 - AuTest: Execute Test Python Scripts with sys.executable


[trafficserver] branch 9.2.x updated: Add Au test for pqsi and pqsp log fields. (#8372)

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new 8df0bb8  Add Au test for pqsi and pqsp log fields. (#8372)
8df0bb8 is described below

commit 8df0bb8f5c1d00730b6512c4cf5817c2ab10b814
Author: Walt Karas 
AuthorDate: Thu Oct 7 16:21:25 2021 -0500

Add Au test for pqsi and pqsp log fields. (#8372)

(cherry picked from commit a7c0f794813b17329b421da38f869884287cece0)
---
 tests/gold_tests/logging/gold/pqsi-pqsp.gold |  2 +
 tests/gold_tests/logging/pqsi-pqsp.test.py   | 95 
 2 files changed, 97 insertions(+)

diff --git a/tests/gold_tests/logging/gold/pqsi-pqsp.gold 
b/tests/gold_tests/logging/gold/pqsi-pqsp.gold
new file mode 100644
index 000..8238b1c
--- /dev/null
+++ b/tests/gold_tests/logging/gold/pqsi-pqsp.gold
@@ -0,0 +1,2 @@
+abc
+0 0
diff --git a/tests/gold_tests/logging/pqsi-pqsp.test.py 
b/tests/gold_tests/logging/pqsi-pqsp.test.py
new file mode 100644
index 000..28a2e03
--- /dev/null
+++ b/tests/gold_tests/logging/pqsi-pqsp.test.py
@@ -0,0 +1,95 @@
+'''
+'''
+#  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.
+
+import os
+
+Test.Summary = '''
+Test pqsi and pqsp log fields.
+'''
+
+ts = Test.MakeATSProcess("ts", enable_cache=False)
+server = Test.MakeOriginServer("server")
+
+request_header = {
+"headers":
+"GET /test HTTP/1.1\r\n"
+"Host: whatever\r\n"
+"\r\n",
+"body": "",
+'timestamp': "1469733493.993",
+}
+response_header = {
+"headers":
+"HTTP/1.1 200 OK\r\n"
+"Connection: close\r\n"
+"\r\n",
+"body": "body\n",
+'timestamp': "1469733493.993",
+}
+server.addResponse("sessionlog.json", request_header, response_header)
+
+nameserver = Test.MakeDNServer("dns", default='127.0.0.1')
+
+ts.Disk.records_config.update({
+'proxy.config.dns.nameservers': f"127.0.0.1:{nameserver.Variables.Port}",
+'proxy.config.dns.resolv_conf': 'NULL',
+'proxy.config.http.cache.http': 1,
+'proxy.config.http.cache.required_headers': 0,
+})
+ts.Disk.remap_config.AddLine(
+'map / http://localhost:{}/'.format(server.Variables.Port)
+)
+
+ts.Disk.logging_yaml.AddLines(
+'''
+logging:
+  formats:
+- name: custom
+  format: '% %'
+  logs:
+- filename: field-test
+  format: custom
+'''.split("\n")
+)
+
+tr = Test.AddTestRun()
+tr.Processes.Default.StartBefore(server)
+tr.Processes.Default.StartBefore(nameserver)
+# Delay on readiness of our ssl ports
+tr.Processes.Default.StartBefore(Test.Processes.ts)
+tr.Processes.Default.Command = f'curl --verbose 
http://localhost:{ts.Variables.port}/test'
+tr.Processes.Default.ReturnCode = 0
+
+# Response for this duplicate request should come from cache.
+tr = Test.AddTestRun()
+tr.Processes.Default.Command = f'curl --verbose 
http://localhost:{ts.Variables.port}/test'
+tr.Processes.Default.ReturnCode = 0
+
+log_filespec = os.path.join(ts.Variables.LOGDIR, 'field-test.log')
+
+# Wait for log file to appear, then wait one extra second to make sure TS is 
done writing it.
+tr = Test.AddTestRun()
+tr.Processes.Default.Command = (
+os.path.join(Test.Variables.AtsTestToolsDir, 'condwait') + ' 60 1 -f ' + 
log_filespec
+)
+tr.Processes.Default.ReturnCode = 0
+
+tr = Test.AddTestRun()
+tr.Processes.Default.Command = "sed '1s/^127.0.0.1 [1-6][0-9]*$$/abc/' < " + 
log_filespec
+tr.Processes.Default.Streams.stdout = "gold/pqsi-pqsp.gold"
+tr.Processes.Default.ReturnCode = 0


[trafficserver] branch 9.2.x updated: Fix a potential H2 stall issue (#8381)

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new f02ba2d  Fix a potential H2 stall issue (#8381)
f02ba2d is described below

commit f02ba2d54ab93ad5266900165cb505d0eaf562eb
Author: Masakazu Kitajo 
AuthorDate: Fri Oct 8 11:07:10 2021 +0900

Fix a potential H2 stall issue (#8381)

(cherry picked from commit 870b857bbbc1d993d6c66672a09b561c13f087d5)
---
 proxy/http2/Http2ConnectionState.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/proxy/http2/Http2ConnectionState.cc 
b/proxy/http2/Http2ConnectionState.cc
index 650b72b..24b0584 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1657,6 +1657,7 @@ Http2ConnectionState::send_a_data_frame(Http2Stream 
*stream, size_t _len
 
   if (this->session->write_avail() == 0) {
 Http2StreamDebug(this->session, stream->get_id(), "Not write avail");
+this->session->flush();
 return Http2SendDataFrameResult::NOT_WRITE_AVAIL;
   }
 


[trafficserver] branch 9.2.x updated: body factory does not respect runroot (#8388)

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new bfe61ef  body factory does not respect runroot (#8388)
bfe61ef is described below

commit bfe61ef32467d82699b3c148431e299493f8a7d0
Author: dragon512 
AuthorDate: Fri Oct 8 10:31:58 2021 -0500

body factory does not respect runroot (#8388)

(cherry picked from commit d19ef809cce96a684e1854b249231c909e0bad02)
---
 lib/records/RecConfigParse.cc | 2 +-
 proxy/http/HttpBodyFactory.cc | 8 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/records/RecConfigParse.cc b/lib/records/RecConfigParse.cc
index bc7e5d5..a6cc89b 100644
--- a/lib/records/RecConfigParse.cc
+++ b/lib/records/RecConfigParse.cc
@@ -89,7 +89,7 @@ RecConfigOverrideFromRunroot(const char *name)
   if (!get_runroot().empty()) {
 if (!strcmp(name, "proxy.config.bin_path") || !strcmp(name, 
"proxy.config.local_state_dir") ||
 !strcmp(name, "proxy.config.log.logfile_dir") || !strcmp(name, 
"proxy.config.plugin.plugin_dir") ||
-!strcmp(name, "proxy.config.hostdb.storage_path")) {
+!strcmp(name, "proxy.config.hostdb.storage_path") || !strcmp(name, 
"proxy.config.body_factory.template_sets_dir")) {
   return true;
 }
   }
diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc
index ee515f1..ecc7943 100644
--- a/proxy/http/HttpBodyFactory.cc
+++ b/proxy/http/HttpBodyFactory.cc
@@ -282,7 +282,13 @@ HttpBodyFactory::reconfigure()
   rec_err   = 
RecGetRecordString_Xmalloc("proxy.config.body_factory.template_sets_dir", );
   all_found = all_found && (rec_err == REC_ERR_OKAY);
   if (rec_err == REC_ERR_OKAY) {
-directory_of_template_sets = Layout::get()->relative(s);
+// check if we should tweak with run_root value
+if (s && strlen(s) > 0) {
+  // the value is set via config file or ENV var
+  directory_of_template_sets = Layout::get()->relative(s);
+} else {
+  directory_of_template_sets = 
Layout::relative_to(RecConfigReadConfigDir(), "body_factory");
+}
 if (access(directory_of_template_sets, R_OK) < 0) {
   Warning("Unable to access() directory '%s': %d, %s", (const char 
*)directory_of_template_sets, errno, strerror(errno));
   Warning(" Please set 'proxy.config.body_factory.template_sets_dir' ");


[trafficserver] branch 9.2.x updated: Update the feature lists available for autest (#8392)

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new bbf7fdb  Update the feature lists available for autest (#8392)
bbf7fdb is described below

commit bbf7fdb4df389282c8ef45d1669bef720d59206b
Author: Masakazu Kitajo 
AuthorDate: Mon Oct 11 09:07:04 2021 +0900

Update the feature lists available for autest (#8392)

This closes #7075.

(cherry picked from commit d2e57c4182086717f25be94201d8a3bc97c7eccd)
---
 doc/developer-guide/testing/blackbox-testing.en.rst | 2 ++
 tests/README.md | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/doc/developer-guide/testing/blackbox-testing.en.rst 
b/doc/developer-guide/testing/blackbox-testing.en.rst
index b42744f..3b4a5c2 100644
--- a/doc/developer-guide/testing/blackbox-testing.en.rst
+++ b/doc/developer-guide/testing/blackbox-testing.en.rst
@@ -236,6 +236,7 @@ Condition Testing
 
 - TS_HAS_LIBZ
 - TS_HAS_LZMA
+- TS_HAS_PIPE_BUFFER_SIZE_CONFIG
 - TS_HAS_JEMALLOC
 - TS_HAS_TCMALLOC
 - TS_HAS_IN6_IS_ADDR_UNSPECIFIED
@@ -252,6 +253,7 @@ Condition Testing
 - TS_HAS_IP_TOS
 - TS_USE_HWLOC
 - TS_USE_SET_RBIO
+- TS_USE_TLS13
 - TS_USE_QUIC
 - TS_USE_LINUX_NATIVE_AIO
 - TS_HAS_SO_PEERCRED
diff --git a/tests/README.md b/tests/README.md
index a6d57ae..898c384 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -295,6 +295,7 @@ ts.Disk.remap_config.AddLine(
  This function tests for Traffic server for possible feature it has been 
compiled with. Current Features you can test for are:
  * TS_HAS_LIBZ
  * TS_HAS_LZMA
+ * TS_HAS_PIPE_BUFFER_SIZE_CONFIG
  * TS_HAS_JEMALLOC
  * TS_HAS_TCMALLOC
  * TS_HAS_IN6_IS_ADDR_UNSPECIFIED
@@ -311,6 +312,7 @@ ts.Disk.remap_config.AddLine(
  * TS_HAS_IP_TOS
  * TS_USE_HWLOC
  * TS_USE_SET_RBIO
+ * TS_USE_TLS13
  * TS_USE_QUIC
  * TS_USE_LINUX_NATIVE_AIO
  * TS_HAS_SO_PEERCRED


[trafficserver] branch 9.2.x updated: Update CacheWrite.cc (#8405)

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new eeaafeb  Update CacheWrite.cc (#8405)
eeaafeb is described below

commit eeaafeb431b33ecb5646268c4f3e9ce4ff88f6de
Author: hankai17 <867614...@qq.com>
AuthorDate: Mon Oct 11 09:04:57 2021 +0800

Update CacheWrite.cc (#8405)

code optimize for cache_evac debug log

(cherry picked from commit a54abe771df8e7d0546d0107b8a24690b9941222)
---
 iocore/cache/CacheWrite.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index cf8d024..605588d 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -458,7 +458,7 @@ CacheVC::evacuateReadHead(int /* event ATS_UNUSED */, Event 
* /* e ATS_UNUSED */
 }
 alternate_tmp = vector.get(alternate_index);
 doc_len   = alternate_tmp->object_size_get();
-Debug("cache_evac", "evacuateReadHead http earliest %X first: %X len: %" 
PRId64, first_key.slice32(0), earliest_key.slice32(0),
+Debug("cache_evac", "evacuateReadHead http earliest %X first: %X len: %" 
PRId64, earliest_key.slice32(0), first_key.slice32(0),
   doc_len);
   } else {
 // non-http document
@@ -468,8 +468,8 @@ CacheVC::evacuateReadHead(int /* event ATS_UNUSED */, Event 
* /* e ATS_UNUSED */
   goto Ldone;
 }
 doc_len = doc->total_len;
-DDebug("cache_evac", "evacuateReadHead non-http earliest %X first: %X len: 
%" PRId64, first_key.slice32(0),
-   earliest_key.slice32(0), doc_len);
+DDebug("cache_evac", "evacuateReadHead non-http earliest %X first: %X len: 
%" PRId64, earliest_key.slice32(0),
+   first_key.slice32(0), doc_len);
   }
   if (doc_len == total_len) {
 // the whole document has been evacuated. Insert the directory


[trafficserver] branch 9.2.x updated: Fix map_with_recv_port URL remapping type. (#8406)

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new 02b06cc  Fix map_with_recv_port URL remapping type. (#8406)
02b06cc is described below

commit 02b06cc4703ee362906c8414b296bec699d9b621
Author: Walt Karas 
AuthorDate: Tue Oct 12 17:32:59 2021 -0500

Fix map_with_recv_port URL remapping type. (#8406)

(cherry picked from commit 85e73b753ec730c55f34d556185a82ee904d5d96)
---
 proxy/http/remap/RemapProcessor.cc |  7 ---
 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 ++
 5 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/proxy/http/remap/RemapProcessor.cc 
b/proxy/http/remap/RemapProcessor.cc
index 3081ae7..ec82148 100644
--- a/proxy/http/remap/RemapProcessor.cc
+++ b/proxy/http/remap/RemapProcessor.cc
@@ -77,9 +77,10 @@ RemapProcessor::setup_for_remap(HttpTransact::State *s, 
UrlRewrite *table)
   Debug("url_rewrite", "[lookup] attempting %s lookup", proxy_request ? 
"proxy" : "normal");
 
   if (table->num_rules_forward_with_recv_port) {
-Debug("url_rewrite", "[lookup] forward mappings with recv port found; 
Using recv port %d", s->client_info.dst_addr.port());
-if (table->forwardMappingWithRecvPortLookup(request_url, 
s->client_info.dst_addr.port(), request_host, request_host_len,
-s->url_map)) {
+Debug("url_rewrite", "[lookup] forward mappings with recv port found; 
Using recv port %d",
+  s->client_info.dst_addr.host_order_port());
+if (table->forwardMappingWithRecvPortLookup(request_url, 
s->client_info.dst_addr.host_order_port(), request_host,
+request_host_len, s->url_map)) 
{
   Debug("url_rewrite", "Found forward mapping with recv port");
   mapping_found = true;
 } else if (table->num_rules_forward == 0) {
diff --git a/tests/gold_tests/remap/gold/remap-https-200_3.gold 
b/tests/gold_tests/remap/gold/remap-https-200_3.gold
new file mode 100644
index 000..f5a6798
--- /dev/null
+++ b/tests/gold_tests/remap/gold/remap-https-200_3.gold
@@ -0,0 +1,13 @@
+``
+> GET / HTTP/1.1
+> Host: www.example3.com``
+> User-Agent: curl/``
+``
+< HTTP/1.1 200 OK
+< Date: ``
+< Age: ``
+< Transfer-Encoding: chunked
+< Connection: keep-alive
+< Server: ATS/``
+< 
+``
diff --git a/tests/gold_tests/remap/gold/remap2-200.gold 
b/tests/gold_tests/remap/gold/remap2-200.gold
new file mode 100644
index 000..016e30e
--- /dev/null
+++ b/tests/gold_tests/remap/gold/remap2-200.gold
@@ -0,0 +1,14 @@
+``
+> GET http://www.example2.com``
+> Host: www.example2.com``
+> User-Agent: curl/``
+> Accept: */*
+``
+< HTTP/1.1 200 OK
+< Date: ``
+< Age: ``
+< Transfer-Encoding: chunked
+< Proxy-Connection: keep-alive
+< Server: ATS/``
+< 
+``
diff --git a/tests/gold_tests/remap/remap_http.test.py 
b/tests/gold_tests/remap/remap_http.test.py
index 551f548..6bf9200 100644
--- a/tests/gold_tests/remap/remap_http.test.py
+++ b/tests/gold_tests/remap/remap_http.test.py
@@ -55,6 +55,9 @@ ts.Disk.remap_config.AddLine(
 'map http://www.example.com 
http://127.0.0.1:{0}'.format(server.Variables.Port)
 )
 ts.Disk.remap_config.AddLine(
+'map_with_recv_port http://www.example2.com:{0} 
http://127.0.0.1:{1}'.format(ts.Variables.port, server.Variables.Port)
+)
+ts.Disk.remap_config.AddLine(
 'map http://www.example.com:8080 
http://127.0.0.1:{0}'.format(server.Variables.Port)
 )
 ts.Disk.remap_config.AddLine(
@@ -91,6 +94,13 @@ tr.Processes.Default.Command = 'curl --proxy 127.0.0.1:{0} 
"http://www.example.c
 tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.Streams.stderr = "gold/remap-200.gold"
 
+# www.example2.com host (match on receive port)
+tr = Test.AddTestRun()
+tr.Processes.Default.Command = 'curl --proxy 127.0.0.1:{0} 
"http://www.example2.com;  -H "Proxy-Connection: keep-alive" --verbose'.format(
+ts.Variables.port)
+tr.Processes.Default.ReturnCode = 0
+tr.Processes.Default.Streams.stderr = "gold/remap2-200.gold"
+
 # www.example.com:80 host
 tr = Test.AddTestRun()
 tr.Processes.Default.Command = 'curl  --proxy 127.0.0.1:{0} 
"http://www.example.com:80/;  -H "Proxy-Connection: keep-alive" 
--verbose'.format(
diff --git a/tests/gold_tests/remap/remap_https.test.py 
b/tests/gold_tests/remap/remap_https.test.py
index a61d954..ba56dc8 100644
--- a/tests/gold_tests/remap/remap_https.test.py
+++ b/tests/gold_tests/remap/remap_https.test.py
@@ -56,6 +56,9 @@ ts.Disk.remap_config.AddLine(
 'map https://www.example.com:{1} 
http://127.0.0.1:{0}'.format(server.Variables.Port, ts.Variables.ssl_port)
 )
 

[trafficserver] branch 9.2.x updated: Add stats for concurrent stream limits exceeded (#8409)

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new 79439b8  Add stats for concurrent stream limits exceeded (#8409)
79439b8 is described below

commit 79439b8b90d8e0b235fbb178b1a5a04a4e054e72
Author: Emanuele Rocca 
AuthorDate: Wed Oct 13 18:01:47 2021 +0200

Add stats for concurrent stream limits exceeded (#8409)

Introduce two new stats tracking when the limits on maximum concurrent
streams are exceeded for both inbound and outbount streams, respectively
proxy.process.http2.max_concurrent_streams_exceeded_in and
proxy.process.http2.max_concurrent_streams_exceeded_out.

See https://datatracker.ietf.org/doc/html/rfc7540#section-5.1.2

(cherry picked from commit 92fd44fb5540fd0928493bc08f8ad28a1dc15789)
---
 .../monitoring/statistics/core/http-connection.en.rst  | 14 ++
 proxy/http2/HTTP2.cc   |  8 
 proxy/http2/HTTP2.h|  2 ++
 proxy/http2/Http2ConnectionState.cc|  2 ++
 4 files changed, 26 insertions(+)

diff --git a/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst 
b/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst
index 37cdcb0..0baa9db 100644
--- a/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst
+++ b/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst
@@ -256,3 +256,17 @@ HTTP/2
Represents the total number of closed HTTP/2 connections for not reaching 
the
minimum average window increment limit which is configured by
:ts:cv:`proxy.config.http2.min_avg_window_update`.
+
+.. ts:stat:: global proxy.process.http2.max_concurrent_streams_exceeded_in 
integer
+   :type: counter
+
+   Represents the number of times an inbound HTTP/2 stream was not created for
+   reaching the maximum number of concurrent streams per inbound connection
+   configured by :ts:cv:`proxy.config.http2.max_concurrent_streams_in`.
+
+.. ts:stat:: global proxy.process.http2.max_concurrent_streams_exceeded_out 
integer
+   :type: counter
+
+   Represents the number of times an outbound HTTP/2 stream was not created for
+   reaching the maximum number of concurrent streams per outbound connection
+   the client can initiate as specified by the server.
diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index 6799425..8a4ba48 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -84,6 +84,10 @@ static const char *const 
HTTP2_STAT_MAX_PING_FRAMES_PER_MINUTE_EXCEEDED_NAME =
 static const char *const 
HTTP2_STAT_MAX_PRIORITY_FRAMES_PER_MINUTE_EXCEEDED_NAME =
   "proxy.process.http2.max_priority_frames_per_minute_exceeded";
 static const char *const HTTP2_STAT_INSUFFICIENT_AVG_WINDOW_UPDATE_NAME = 
"proxy.process.http2.insufficient_avg_window_update";
+static const char *const HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_IN_NAME =
+  "proxy.process.http2.max_concurrent_streams_exceeded_in";
+static const char *const HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_OUT_NAME =
+  "proxy.process.http2.max_concurrent_streams_exceeded_out";
 
 union byte_pointer {
   byte_pointer(void *p) : ptr(p) {}
@@ -899,6 +903,10 @@ Http2::init()
  
static_cast(HTTP2_STAT_MAX_PRIORITY_FRAMES_PER_MINUTE_EXCEEDED), 
RecRawStatSyncSum);
   RecRegisterRawStat(http2_rsb, RECT_PROCESS, 
HTTP2_STAT_INSUFFICIENT_AVG_WINDOW_UPDATE_NAME, RECD_INT, RECP_PERSISTENT,
  
static_cast(HTTP2_STAT_INSUFFICIENT_AVG_WINDOW_UPDATE), RecRawStatSyncSum);
+  RecRegisterRawStat(http2_rsb, RECT_PROCESS, 
HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_IN_NAME, RECD_INT, RECP_PERSISTENT,
+ 
static_cast(HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_IN), 
RecRawStatSyncSum);
+  RecRegisterRawStat(http2_rsb, RECT_PROCESS, 
HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_OUT_NAME, RECD_INT, RECP_PERSISTENT,
+ 
static_cast(HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_OUT), 
RecRawStatSyncSum);
 
   http2_init();
 }
diff --git a/proxy/http2/HTTP2.h b/proxy/http2/HTTP2.h
index d2eed22..e5fdc3e 100644
--- a/proxy/http2/HTTP2.h
+++ b/proxy/http2/HTTP2.h
@@ -105,6 +105,8 @@ enum {
   HTTP2_STAT_MAX_PING_FRAMES_PER_MINUTE_EXCEEDED,
   HTTP2_STAT_MAX_PRIORITY_FRAMES_PER_MINUTE_EXCEEDED,
   HTTP2_STAT_INSUFFICIENT_AVG_WINDOW_UPDATE,
+  HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_IN,
+  HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_OUT,
 
   HTTP2_N_STATS // Terminal counter, NOT A STAT INDEX.
 };
diff --git a/proxy/http2/Http2ConnectionState.cc 
b/proxy/http2/Http2ConnectionState.cc
index 75e8588..650b72b 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1322,12 +1322,14 @@ Http2ConnectionState::create_stream(Http2StreamId 
new_id, Http2Error )
   

[trafficserver] branch 9.2.x updated: AuTest: Execute Test Python Scripts with sys.executable (#8412)

2021-10-13 Thread zwoop
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
 new 56f2e9b  AuTest: Execute Test Python Scripts with sys.executable 
(#8412)
56f2e9b is described below

commit 56f2e9baa6e79d82451a330bcdd781ebd42d0cdc
Author: Brian Neradt 
AuthorDate: Wed Oct 13 12:23:47 2021 -0500

AuTest: Execute Test Python Scripts with sys.executable (#8412)

A handful of our AuTests execute their own Python scripts. Generally
these just ran with whatever `python3` picked up. This changes those to
use {sys.executable} which will run those scripts with the same Python
being used for autest itself rather than some other system Python which
may not have the required dependencies installed in it. This way any
requirements for the scripts can be placed in the tests/Pipfile and it
should be available for those scripts.

(cherry picked from commit 6c3e9d22a072aa8ab55cc21b4b041a2d635577b5)
---
 tests/Pipfile  |   1 +
 tests/gold_tests/basic/deny0.test.py   |  11 +-
 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/log_pipe.test.py  |   3 +-
 tests/gold_tests/logging/new_log_flds.test.py  |   7 +-
 tests/gold_tests/logging/sigusr2.test.py   |   5 +-
 .../pluginTest/combo_handler/combo_handler.test.py |   9 +-
 .../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 ++---
 .../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/slow_post/slow_post.test.py   |   5 +-
 .../gold_tests/thread_config/thread_config.test.py |  41 ---
 tests/gold_tests/tls/tls_0rtt_server.test.py   |  20 ++--
 25 files changed, 213 insertions(+), 212 deletions(-)

diff --git a/tests/Pipfile b/tests/Pipfile
index 321872e..4c810ba 100644
--- a/tests/Pipfile
+++ b/tests/Pipfile
@@ -35,6 +35,7 @@ dnslib = "*"
 requests = "*"
 gunicorn = "*"
 httpbin = "*"
+psutil = "*"
 
 # Keep init.cli.ext updated with this required microserver version.
 microserver = ">=1.0.6"
diff --git a/tests/gold_tests/basic/deny0.test.py 
b/tests/gold_tests/basic/deny0.test.py
index 285ad4c..ecb9f48 100644
--- a/tests/gold_tests/basic/deny0.test.py
+++ b/tests/gold_tests/basic/deny0.test.py
@@ -18,6 +18,8 @@ Test that Trafficserver rejects requests for host 0
 #  limitations under the License.
 
 import os
+import sys
+
 Test.Summary = '''
 Test that Trafficserver rejects requests for host 0
 '''
@@ -61,10 +63,13 @@ def buildMetaTest(testName, requestString):
 tr.Processes.Default.StartBefore(ts)
 tr.Processes.Default.StartBefore(redirect_serv, 
ready=When.PortOpen(redirect_serv.Variables.Port))
 tr.Processes.Default.StartBefore(dns)
-with open(os.path.join(data_path, tr.Name), 'w') as f:
+
+requestCommandPath = os.path.join(data_path, tr.Name)
+with open(requestCommandPath, 'w') as f:
 f.write(requestString)
-tr.Processes.Default.Command = "python3 tcp_client.py 127.0.0.1 {0} {1} | 
head -1".format(
-ts.Variables.port, os.path.join(data_dirname, tr.Name))
+tr.Processes.Default.Command = \
+(f"{sys.executable} tcp_client.py 127.0.0.1 {ts.Variables.port} "
+ f"{requestCommandPath} | head -1")
 tr.ReturnCode = 0
 tr.Processes.Default.Streams.stdout = gold_filepath
 tr.StillRunningAfter = ts
diff --git a/tests/gold_tests/h2/http2.test.py 
b/tests/gold_tests/h2/http2.test.py
index e6d2801..3847619 100644
--- a/tests/gold_tests/h2/http2.test.py
+++ b/tests/gold_tests/h2/http2.test.py
@@ -17,6 +17,8 @@
 #  limitations under the License.
 
 import os
+import sys
+
 Test.Summary = '''
 Test a basic remap of a http/2 connection
 '''
@@ -143,7 +145,7 @@ ts.Setup.CopyAs('h2active_timeout.py', Test.RunDirectory)
 
 # Test Case 1:  basic H2 interaction
 tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'python3 h2client.py -p 
{0}'.format(ts.Variables.ssl_port)
+tr.Processes.Default.Command = f'{sys.executable} h2client.py -p 

[trafficserver] branch master updated (9467454 -> adaa3f5)

2021-10-13 Thread eze
This is an automated email from the ASF dual-hosted git repository.

eze pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 9467454  Added required checks before merging (#8413)
 add adaa3f5  Don't require branch to be up to date before merging (#8416)

No new revisions were added by this update.

Summary of changes:
 .asf.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


[trafficserver] branch 92x-pr-test updated: Update README

2021-10-13 Thread eze
This is an automated email from the ASF dual-hosted git repository.

eze pushed a commit to branch 92x-pr-test
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/92x-pr-test by this push:
 new f8c8e77  Update README
f8c8e77 is described below

commit f8c8e774e65d44e07033cf037acdbe88e2e2e323
Author: Evan Zelkowitz 
AuthorDate: Wed Oct 13 13:33:04 2021 -0600

Update README
---
 README | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README b/README
index dee536d..88d7582 100644
--- a/README
+++ b/README
@@ -1,3 +1,5 @@
+test
+
 Apache Traffic Server
 
 Traffic Server is a high-performance building block for cloud services.


[trafficserver] branch 92x-pr-test created (now 59287b9)

2021-10-13 Thread eze
This is an automated email from the ASF dual-hosted git repository.

eze pushed a change to branch 92x-pr-test
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


  at 59287b9  Fix regex_remap plugin redirection. (#8359)

No new revisions were added by this update.


[trafficserver] branch master updated (6c3e9d2 -> 9467454)

2021-10-13 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 6c3e9d2  AuTest: Execute Test Python Scripts with sys.executable 
(#8412)
 add 9467454  Added required checks before merging (#8413)

No new revisions were added by this update.

Summary of changes:
 .asf.yaml | 14 ++
 1 file changed, 14 insertions(+)


[trafficserver] branch master updated (92fd44f -> 6c3e9d2)

2021-10-13 Thread bneradt
This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 92fd44f  Add stats for concurrent stream limits exceeded (#8409)
 add 6c3e9d2  AuTest: Execute Test Python Scripts with sys.executable 
(#8412)

No new revisions were added by this update.

Summary of changes:
 tests/Pipfile  |   1 +
 tests/gold_tests/basic/deny0.test.py   |  11 +-
 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/log_pipe.test.py  |   3 +-
 tests/gold_tests/logging/new_log_flds.test.py  |   7 +-
 tests/gold_tests/logging/sigusr2.test.py   |   5 +-
 .../pluginTest/combo_handler/combo_handler.test.py |   9 +-
 .../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 ++---
 .../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/slow_post/slow_post.test.py   |   5 +-
 .../gold_tests/thread_config/thread_config.test.py |  41 ---
 tests/gold_tests/tls/tls_0rtt_server.test.py   |  20 ++--
 25 files changed, 213 insertions(+), 212 deletions(-)


[trafficserver] branch master updated: Add stats for concurrent stream limits exceeded (#8409)

2021-10-13 Thread rrm
This is an automated email from the ASF dual-hosted git repository.

rrm 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 92fd44f  Add stats for concurrent stream limits exceeded (#8409)
92fd44f is described below

commit 92fd44fb5540fd0928493bc08f8ad28a1dc15789
Author: Emanuele Rocca 
AuthorDate: Wed Oct 13 18:01:47 2021 +0200

Add stats for concurrent stream limits exceeded (#8409)

Introduce two new stats tracking when the limits on maximum concurrent
streams are exceeded for both inbound and outbount streams, respectively
proxy.process.http2.max_concurrent_streams_exceeded_in and
proxy.process.http2.max_concurrent_streams_exceeded_out.

See https://datatracker.ietf.org/doc/html/rfc7540#section-5.1.2
---
 .../monitoring/statistics/core/http-connection.en.rst  | 14 ++
 proxy/http2/HTTP2.cc   |  8 
 proxy/http2/HTTP2.h|  2 ++
 proxy/http2/Http2ConnectionState.cc|  2 ++
 4 files changed, 26 insertions(+)

diff --git a/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst 
b/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst
index 37cdcb0..0baa9db 100644
--- a/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst
+++ b/doc/admin-guide/monitoring/statistics/core/http-connection.en.rst
@@ -256,3 +256,17 @@ HTTP/2
Represents the total number of closed HTTP/2 connections for not reaching 
the
minimum average window increment limit which is configured by
:ts:cv:`proxy.config.http2.min_avg_window_update`.
+
+.. ts:stat:: global proxy.process.http2.max_concurrent_streams_exceeded_in 
integer
+   :type: counter
+
+   Represents the number of times an inbound HTTP/2 stream was not created for
+   reaching the maximum number of concurrent streams per inbound connection
+   configured by :ts:cv:`proxy.config.http2.max_concurrent_streams_in`.
+
+.. ts:stat:: global proxy.process.http2.max_concurrent_streams_exceeded_out 
integer
+   :type: counter
+
+   Represents the number of times an outbound HTTP/2 stream was not created for
+   reaching the maximum number of concurrent streams per outbound connection
+   the client can initiate as specified by the server.
diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index 6799425..8a4ba48 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -84,6 +84,10 @@ static const char *const 
HTTP2_STAT_MAX_PING_FRAMES_PER_MINUTE_EXCEEDED_NAME =
 static const char *const 
HTTP2_STAT_MAX_PRIORITY_FRAMES_PER_MINUTE_EXCEEDED_NAME =
   "proxy.process.http2.max_priority_frames_per_minute_exceeded";
 static const char *const HTTP2_STAT_INSUFFICIENT_AVG_WINDOW_UPDATE_NAME = 
"proxy.process.http2.insufficient_avg_window_update";
+static const char *const HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_IN_NAME =
+  "proxy.process.http2.max_concurrent_streams_exceeded_in";
+static const char *const HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_OUT_NAME =
+  "proxy.process.http2.max_concurrent_streams_exceeded_out";
 
 union byte_pointer {
   byte_pointer(void *p) : ptr(p) {}
@@ -899,6 +903,10 @@ Http2::init()
  
static_cast(HTTP2_STAT_MAX_PRIORITY_FRAMES_PER_MINUTE_EXCEEDED), 
RecRawStatSyncSum);
   RecRegisterRawStat(http2_rsb, RECT_PROCESS, 
HTTP2_STAT_INSUFFICIENT_AVG_WINDOW_UPDATE_NAME, RECD_INT, RECP_PERSISTENT,
  
static_cast(HTTP2_STAT_INSUFFICIENT_AVG_WINDOW_UPDATE), RecRawStatSyncSum);
+  RecRegisterRawStat(http2_rsb, RECT_PROCESS, 
HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_IN_NAME, RECD_INT, RECP_PERSISTENT,
+ 
static_cast(HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_IN), 
RecRawStatSyncSum);
+  RecRegisterRawStat(http2_rsb, RECT_PROCESS, 
HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_OUT_NAME, RECD_INT, RECP_PERSISTENT,
+ 
static_cast(HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_OUT), 
RecRawStatSyncSum);
 
   http2_init();
 }
diff --git a/proxy/http2/HTTP2.h b/proxy/http2/HTTP2.h
index d2eed22..e5fdc3e 100644
--- a/proxy/http2/HTTP2.h
+++ b/proxy/http2/HTTP2.h
@@ -105,6 +105,8 @@ enum {
   HTTP2_STAT_MAX_PING_FRAMES_PER_MINUTE_EXCEEDED,
   HTTP2_STAT_MAX_PRIORITY_FRAMES_PER_MINUTE_EXCEEDED,
   HTTP2_STAT_INSUFFICIENT_AVG_WINDOW_UPDATE,
+  HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_IN,
+  HTTP2_STAT_MAX_CONCURRENT_STREAMS_EXCEEDED_OUT,
 
   HTTP2_N_STATS // Terminal counter, NOT A STAT INDEX.
 };
diff --git a/proxy/http2/Http2ConnectionState.cc 
b/proxy/http2/Http2ConnectionState.cc
index 5e87fd8..24b0584 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -1322,12 +1322,14 @@ Http2ConnectionState::create_stream(Http2StreamId 
new_id, Http2Error )
   // stream limit to be exceeded MUST treat this as a stream error.
   if