Skip to content

For fedora 44: remap ACL reload Commands rather than Ready - #13237

Merged
bneradt merged 1 commit into
apache:masterfrom
bneradt:fix-remap-acl-reload-wait
Jun 4, 2026
Merged

For fedora 44: remap ACL reload Commands rather than Ready#13237
bneradt merged 1 commit into
apache:masterfrom
bneradt:fix-remap-acl-reload-wait

Conversation

@bneradt

@bneradt bneradt commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

The remap ACL AuTests run hundreds of reload scenarios in a single case,
and the Fedora 44 shard is sensitive to extra reload-wait overhead
resulting in the remap_acl tests hanging when run in the same shard.
Their reload sentinel also counted only explicit reloads, even though
the log contains the startup load marker too.

This replaces the long-lived sleep Ready helper with a short command
that exits once the expected reload marker count is present. This also
waits for the startup marker plus the explicit reload count, so each
scenario observes the reload it just requested.

Copilot AI review requested due to automatic review settings June 4, 2026 02:44
@bneradt bneradt added this to the 11.0.0 milestone Jun 4, 2026
@bneradt bneradt self-assigned this Jun 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the remap ACL AuTest reload-wait logic to reduce per-scenario overhead by replacing a long-lived sleep-based sentinel with a short-lived helper command that exits as soon as the expected “finished loading” marker count is observed in diags.log. It also adjusts the marker counting to include the startup load marker in addition to explicit reloads, ensuring each scenario waits for the reload it just triggered.

Changes:

  • Replace the sleep 30 + When.FileContains(...) sentinel process with a Python helper invocation that exits immediately once the expected marker count is present.
  • Adjust the expected marker count to include the initial startup “finished loading” marker (1 + reload_count).
  • Add a reusable tests/gold_tests/lib/wait_for_file_contains.py helper script to wait for N occurrences of a substring in a file (with timeout).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/gold_tests/remap/remap_acl.test.py Switches the reload-wait step to a helper command and updates the expected marker count to include startup.
tests/gold_tests/remap_yaml/remap_acl_yaml.test.py Mirrors the same reload-wait optimization for remap.yaml scenarios.
tests/gold_tests/lib/wait_for_file_contains.py Adds a small helper utility to poll a file until a substring appears N times (or timeout).

Comment thread tests/gold_tests/remap/remap_acl.test.py Outdated
Comment thread tests/gold_tests/remap_yaml/remap_acl_yaml.test.py Outdated
Comment thread tests/gold_tests/lib/wait_for_file_contains.py Outdated
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from 45ba5e7 to be1a086 Compare June 4, 2026 03:02
Copilot AI review requested due to automatic review settings June 4, 2026 03:11
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from be1a086 to cc9b360 Compare June 4, 2026 03:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread tests/tools/condwait
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from cc9b360 to 2965901 Compare June 4, 2026 03:22
Copilot AI review requested due to automatic review settings June 4, 2026 03:36
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from 2965901 to 3df5439 Compare June 4, 2026 03:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread tests/tools/condwait
Comment thread tests/tools/condwait
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from 3df5439 to eb0ef9b Compare June 4, 2026 03:45
@bneradt bneradt changed the title Trim remap ACL reload waits For fedora 44: Trim remap ACL reload waits Jun 4, 2026
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from eb0ef9b to 5b0813c Compare June 4, 2026 03:46
@bneradt bneradt changed the title For fedora 44: Trim remap ACL reload waits For fedora 44: remap ACL reload Commands rather than Ready Jun 4, 2026
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from 5b0813c to c56121f Compare June 4, 2026 04:05
Copilot AI review requested due to automatic review settings June 4, 2026 04:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread tests/tools/condwait
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from c56121f to 95b248a Compare June 4, 2026 19:39
The remap ACL AuTests run hundreds of reload scenarios in a single case,
and the Fedora 44 shard is sensitive to extra reload-wait overhead,
causing the tests to hang. Their reload sentinel also counted only
explicit reloads, even though the log contains the startup load marker
too.

This replaces the long-lived sleep Ready helper with a short command
that exits once the expected reload marker count is present. This also
waits for the startup marker plus the explicit reload count, so each
scenario observes the reload it just requested.
Copilot AI review requested due to automatic review settings June 4, 2026 20:32
@bneradt
bneradt force-pushed the fix-remap-acl-reload-wait branch from 95b248a to cf94a58 Compare June 4, 2026 20:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@bneradt
bneradt merged commit c52eeda into apache:master Jun 4, 2026
15 checks passed
@bneradt
bneradt deleted the fix-remap-acl-reload-wait branch June 4, 2026 21:32
bneradt added a commit to bneradt/trafficserver that referenced this pull request Jun 10, 2026
The remap ACL AuTests run hundreds of reload scenarios in a single case,
and the Fedora 44 shard is sensitive to extra reload-wait overhead,
causing the tests to hang. Their reload sentinel also counted only
explicit reloads, even though the log contains the startup load marker
too.

This replaces the long-lived sleep Ready helper with a short command
that exits once the expected reload marker count is present. This also
waits for the startup marker plus the explicit reload count, so each
scenario observes the reload it just requested.

(cherry picked from commit c52eeda)
cmcfarlen pushed a commit that referenced this pull request Jun 10, 2026
* curl 8.20 test update: curl PROXY destination changes (#13239)

curl 8.20 intentionally mirrors --haproxy-clientip into both PROXY
addresses to keep the header address family consistent. The
TSVConnPPInfo AuTest still expected the older destination address, so
jobs with newer curl failed even though ATS preserved the PROXY metadata
it received.

This relaxes the destination-address expectation to accept either curl
behavior while continuing to verify the source address and PROXY
metadata. This also wraps the long curl command strings while leaving
the test's request flow unchanged.

(cherry picked from commit ad0ce02)

* fedora:44: Trim remap ACL reload waits (#13237)

The remap ACL AuTests run hundreds of reload scenarios in a single case,
and the Fedora 44 shard is sensitive to extra reload-wait overhead,
causing the tests to hang. Their reload sentinel also counted only
explicit reloads, even though the log contains the startup load marker
too.

This replaces the long-lived sleep Ready helper with a short command
that exits once the expected reload marker count is present. This also
waits for the startup marker plus the explicit reload count, so each
scenario observes the reload it just requested.

(cherry picked from commit c52eeda)

* Align AuTests with latest proxy-verifier checks (#12986)

The latest proxy-verifier now fails a run when a verifier server or
client is given proxy-side checks for traffic that ATS never produces.
Most tests only needed stale proxy-request or proxy-response nodes
removed, but the shared replay cases below need server-specific files
so each verifier only owns traffic it can actually observe.

- disable_pristine_host_hdr_server_canary_false.replay.yaml keeps
  the canary server on uuid 1 when pristine_host_hdr stays enabled.
- disable_pristine_host_hdr_server_canary_true.replay.yaml keeps the
  canary server on uuid 1 when the Host header is rewritten.
- disable_pristine_host_hdr_server_stable.replay.yaml keeps the
  stable server on uuid 2, which the canary server never receives.
- escalate_original_server_default.replay.yaml keeps only the
  requests that the default-mode origin server really handles.
- escalate_failover_server_default.replay.yaml keeps only the GET
  requests that default-mode escalation sends to failover.
- escalate_original_server_non_get.replay.yaml keeps the origin-side
  subset when --escalate-non-get-methods is enabled.
- escalate_failover_server_non_get.replay.yaml keeps the failover
  subset, including the escalated HEAD request in that mode.
- ja4_fingerprint_basic_server.replay.yaml limits the non-preserve
  test to its one real request instead of preserve-only checks.
- traffic_dump_server.yaml keeps origin verification only for the
  sessions that really reach origin in the main traffic_dump test.
- traffic_dump_ip_filter_server.yaml keeps only the /one request
  used by the traffic_dump IP filter test.

These per-server replays preserve fallback server-response directives
and client-side coverage while dropping only the proxy-side checks
that latest proxy-verifier now correctly reports as unprocessed.

(cherry picked from commit ecf505c)

* Fix 10.1.x PV replay expectations

Adjust two replay expectations after backporting the proxy-verifier 3.1 cleanup. The 10.1.x branch has fewer escalate transactions, and duplicate header checks now observe the combined header value.

* [autest] thread_config: add startup polling and skip test on non-Linux (#12940)

* thread_config: add startup polling for thread checks and skip on non-Linux
check_threads.py now uses a short bounded poll/retry window so thread-count
validation does not fail on startup races; the test is also skipped on
non-Linux platforms because per-thread introspection used by this check is not
reliably available there.
* thread_config: stop retrying when Process.threads() access is denied

(cherry picked from commit 6dfaadd)

* Fix flaky autests for timeout, sigusr2, and thread_config (#13012)

* Handle SIGPIPE in ssl-delay-server to prevent helper death
  when a client disconnects during TLS handshake delay.
* Retry accept() on EINTR under heavy parallel load instead
  of treating the interruption as a fatal error.
* Fix accept() error check to use < 0 instead of <= 0 since
  fd 0 is a valid descriptor when stdin is closed.
* Add cmdline matching fallback in check_threads.py for ASAN
  where the process CWD differs from expected ts_path.

(cherry picked from commit ff31470)

* Fix 10.1.x JA4 AuTest setup

Initialize the branch-local JA4 test helper's preserve flag after backporting replay changes from master. Without it the test fails during Python load before the actual replay runs.

* Proxy Verifier: use concise stack protocol specification (#13003)

Proxy Verifier v3.0.0 has a more concise `stack` configurable for
`protocol` specification. This makes use of that over the more verbose
full `protocol` sequence.

* tests/gold_tests/headers tests: use ATSReplayTest (#13033)

Move the replay-friendly headers gold tests to ATSReplayTest
wrappers and describe their ATS, origin, and client setup in
replay YAML.

This keeps the cache, range, redirect, HSTS, and alternate
handling coverage while making the tests easier to read and
maintain, and removes the old gold files left orphaned by the
conversion.

(cherry picked from commit 49cb7c8)

* Adapt headers replay tests for 10.1.x

---------

Co-authored-by: bneradt <bneradt@yahooinc.com>
Co-authored-by: Mo Chen <mochen@apache.org>
Co-authored-by: Bryan Call <bcall@apache.org>
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Jul 2, 2026
The remap ACL AuTests run hundreds of reload scenarios in a single case,
and the Fedora 44 shard is sensitive to extra reload-wait overhead,
causing the tests to hang. Their reload sentinel also counted only
explicit reloads, even though the log contains the startup load marker
too.

This replaces the long-lived sleep Ready helper with a short command
that exits once the expected reload marker count is present. This also
waits for the startup marker plus the explicit reload count, so each
scenario observes the reload it just requested.

(cherry picked from commit c52eeda)
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Jul 6, 2026
cmcfarlen pushed a commit that referenced this pull request Jul 6, 2026
* proxy/unit_tests: restore IpAllow::subjects stub definition

#13278 dropped this definition, but test_proxy links ts::http
(which references IpAllow::subjects) ahead of ts::proxy (which
defines it). GNU ld's single-pass archive scan then leaves the
symbol unresolved, breaking the Linux build; macOS links fine.
master avoids this incidentally via test_PluginYAML.cc from the
unbackported plugin.yaml migration (#13070).

* tls autests: use ssl_multicert.config instead of yaml

These tests were backported from master, where the default cert
config is ssl_multicert.yaml and the harness exposes
ts.Disk.ssl_multicert_yaml. On 10.2.x the default is still legacy
ssl_multicert.config and no ssl_multicert_yaml Disk attribute is
registered, so the tests failed at collection. Switch them to the
ssl_multicert.config one-liner used by the other 10.2.x TLS tests.

* curl 8.20 test update: curl PROXY destination changes (#13239)

curl 8.20 intentionally mirrors --haproxy-clientip into both PROXY
addresses to keep the header address family consistent. The
TSVConnPPInfo AuTest still expected the older destination address, so
jobs with newer curl failed even though ATS preserved the PROXY metadata
it received.

This relaxes the destination-address expectation to accept either curl
behavior while continuing to verify the source address and PROXY
metadata. This also wraps the long curl command strings while leaving
the test's request flow unchanged.

(cherry picked from commit ad0ce02)

* fedora:44: Trim remap ACL reload waits (#13237)

The remap ACL AuTests run hundreds of reload scenarios in a single case,
and the Fedora 44 shard is sensitive to extra reload-wait overhead,
causing the tests to hang. Their reload sentinel also counted only
explicit reloads, even though the log contains the startup load marker
too.

This replaces the long-lived sleep Ready helper with a short command
that exits once the expected reload marker count is present. This also
waits for the startup marker plus the explicit reload count, so each
scenario observes the reload it just requested.

(cherry picked from commit c52eeda)

---------

Co-authored-by: Brian Neradt <brian.neradt@gmail.com>
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Jul 13, 2026
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
The remap ACL AuTests run hundreds of reload scenarios in a single case,
and the Fedora 44 shard is sensitive to extra reload-wait overhead,
causing the tests to hang. Their reload sentinel also counted only
explicit reloads, even though the log contains the startup load marker
too.

This replaces the long-lived sleep Ready helper with a short command
that exits once the expected reload marker count is present. This also
waits for the startup marker plus the explicit reload count, so each
scenario observes the reload it just requested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

4 participants