Skip to content

Commit f678fd3

Browse files
committed
Begin work on Trafficserver 10 upgrade.
1 parent 0d8df64 commit f678fd3

File tree

8 files changed

+293
-259
lines changed

8 files changed

+293
-259
lines changed

config/schema.cue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,18 @@ import "path"
143143
storage: {
144144
size: string | *"256M"
145145
}
146-
embedded_server_config: {
147-
records: [...string] | *[]
146+
records: {
147+
cache: {
148+
ram_cache: {
149+
size: string | *"-1"
150+
}
151+
}
152+
net: {
153+
connections_throttle: uint | *30000
154+
max_requests_in: uint | *0
155+
max_connections_in: uint | *30000
156+
default_inactivity_timeout: uint | *86400
157+
}
148158
}
149159
}
150160

src/api-umbrella/utils/generate_runtime_config.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,6 @@ local function set_computed_config(config)
390390
-- since we will allow long-running streaming responses..
391391
config["envoy"]["_route_timeout"] = "0s"
392392
config["trafficserver"]["_connect_attempts_timeout"] = math.min(5, config["nginx"]["proxy_connect_timeout"])
393-
config["trafficserver"]["_post_connect_attempts_timeout"] = math.min(5, config["trafficserver"]["_connect_attempts_timeout"])
394393
config["trafficserver"]["_transaction_no_activity_timeout_out"] = config["nginx"]["proxy_read_timeout"]
395394
config["trafficserver"]["_transaction_no_activity_timeout_in"] = config["nginx"]["proxy_send_timeout"]
396395
config["nginx"]["_initial_proxy_connect_timeout"] = math.min(5, config["nginx"]["proxy_connect_timeout"])

tasks/deps/trafficserver

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# https://github.com/apache/trafficserver/issues/10393 This issue has been
55
# reproducible by running the following test in a loop:
66
# bundle exec minitest test/apis/test_web_app_large_body.rb -n test_limit_is_configurable
7-
trafficserver_version="9.1.4"
8-
trafficserver_hash="f18aca66e444470738f6031366edc45db26942917e3fe8cba9fbb3b28173e01e06991aa9846e459047365946738931b1910719574c9c2afee72e4dfb30eab617"
7+
trafficserver_version="10.0.2"
8+
trafficserver_hash="5de65130d4c0997d619d0c1be6840aaffd3e17abd820d22b9294c4d78834eb71a58fed12f3166396c7169583850a8b42ed768e5af11e855c87b2fca8a10da7f3"
99

1010
set -e -u -x
1111
source ./tasks/helpers.sh
@@ -15,30 +15,22 @@ task_working_dir
1515
download "https://archive.apache.org/dist/trafficserver/trafficserver-$trafficserver_version.tar.bz2" "sha512" "$trafficserver_hash"
1616
extract_download "trafficserver-$trafficserver_version.tar.bz2"
1717

18-
detect_os_release
19-
if [[ "$ID_NORMALIZED" == "rhel" && "$VERSION_ID" == "7" ]]; then
20-
export CC=/opt/rh/devtoolset-7/root/usr/bin/gcc
21-
export CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
22-
elif [[ "$ID" == "debian" && "$VERSION_ID" == "9" ]]; then
23-
export CC=clang-7
24-
export CXX=clang++-7
25-
export CXXFLAGS="-I/usr/lib/llvm-7/include/c++/v1 -stdlib=libc++"
26-
fi
27-
2818
cd "trafficserver-$trafficserver_version"
2919

30-
SPHINXBUILD=false ./configure \
31-
--disable-tests \
32-
--disable-silent-rules \
33-
--disable-maintainer-mode \
34-
--disable-dependency-tracking \
35-
--prefix="$INSTALL_PREFIX_EMBEDDED" \
36-
--with-jemalloc \
37-
--with-luajit="$STAGE_EMBEDDED_DIR/openresty/luajit"
38-
make -j"$NPROC"
39-
make install DESTDIR="$STAGE_DIR"
40-
chrpath -d "$STAGE_EMBEDDED_DIR/lib/libtscore.so"
41-
chrpath -d "$STAGE_EMBEDDED_DIR/lib/libtsmgmt.so"
20+
PKG_CONFIG_PATH="$STAGE_EMBEDDED_DIR/openresty/luajit/lib/pkgconfig:${PKG_CONFIG_PATH:-}" \
21+
cmake -B build \
22+
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX_EMBEDDED" \
23+
-DENABLE_LUAJIT=ON \
24+
-DENABLE_JEMALLOC=ON
25+
26+
cmake --build build -j "$NPROC"
27+
28+
cmake --install build
29+
30+
chrpath -d "$STAGE_EMBEDDED_DIR/lib/libswoc"*.so
31+
chrpath -d "$STAGE_EMBEDDED_DIR/lib/libtsapi.so"
32+
chrpath -d "$STAGE_EMBEDDED_DIR/lib/libtscppapi.so"
33+
chrpath -d "$STAGE_EMBEDDED_DIR/lib/libyaml-cpp.so"
4234
find "$STAGE_EMBEDDED_DIR/libexec/trafficserver/" -name "*.so" -exec chrpath -d {} \;
4335
find "$STAGE_EMBEDDED_DIR/bin/" -name "traffic_*" -exec chrpath -d {} \;
4436

templates/etc/perp/trafficserver/rc.main.etlua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ if [ "${1}" = "start" ]; then
3636
ln -sf /dev/stderr "<%- config['log_dir'] %>/trafficserver/traffic.out"
3737
fi
3838

39-
exec runtool ${run_args[@]+"${run_args[@]}"} traffic_manager --nosyslog
39+
# Disable freelist args to use jemalloc for memory management.
40+
# https://github.com/apache/trafficserver/issues/9162#issuecomment-1292274810
41+
# https://github.com/apache/trafficserver/issues/3354
42+
exec runtool ${run_args[@]+"${run_args[@]}"} traffic_server --disable_freelist --disable_pfreelist
4043
fi
4144

4245
exit 0
File renamed without changes.

templates/etc/trafficserver/logging.yaml.etlua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ logging:
55
# chi: Client: IP address of the client’s host.
66
# caun: Client Request: Authentication User name
77
# cqtn: Client Request: Client request timestamp
8-
# cqtx: Client Request: HTTP client request text
8+
# cqhm: Client Request: HTTP method
9+
# pqu: Proxy Request: URL
10+
# cqpv: Client Request: Request protocol and version
911
# pssc: Proxy Response: HTTP response status code sent by Traffic Server proxy to the client.
1012
# pscl: Proxy Response: Content body length of the Traffic Server proxy response.
1113
#
@@ -44,7 +46,7 @@ logging:
4446
# csssc: Cached Proxy: Response HTTP response status code of the origin server response, as cached by Traffic Server.
4547
# cqtr: Client Request: TCP reused status of the connection between the client and Traffic Server proxy, indicating whether the request was delivered through an already established connection.
4648
# cquuc: Client Request: Canonical (prior to remapping) effective URL from client request.
47-
format: '[%<cqtn>] "%<cqtx>" %<pssc> id=%<{X-Api-Umbrella-Request-ID}cqh> up_status=%<sssc> time=%<ttms> origin_time=%<stms> client_finish=%<cfsc> proxy_finish=%<pfsc> cache=%<crc> cache_sub=%<crsc> cache_hit=%<chm> cache_write=%<cwr> con_attempt=%<sca> '
49+
format: '[%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> id=%<{X-Api-Umbrella-Request-ID}cqh> up_status=%<sssc> time=%<ttms> origin_time=%<stms> client_finish=%<cfsc> proxy_finish=%<pfsc> cache=%<crc> cache_sub=%<crsc> cache_hit=%<chm> cache_write=%<cwr> con_attempt=%<sca> '
4850

4951
logs:
5052
- mode: <%- (config["log"]["destination"] == "console") and "ascii_pipe" or "ascii" %>

templates/etc/trafficserver/records.config.etlua

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)