mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
fix(svc-net-tor): give the onion probe Tor's own patience
The probe abandoned each attempt at --max-time 30 while Tor's SocksTimeout
sits at its 120s default (no SocksTimeout anywhere in the repo; positive
control SocksPort hits templates/torrc.j2:1). It gave up at a quarter of
Tor's working window, and destructively: every retry opens a fresh SOCKS
connection, discarding the descriptor fetches and rendezvous retries Tor
was still working through.
Run 32284541284 job 96178512465 shows the cost. Ansible recorded start
07:22:17.260, end 07:26:33.366, delta 0:04:16.105994. The first domain
burned its deterministic 6x30 + 5x10 = 230s and failed; the second then
succeeded on its first attempt but needed ~23s of that 30s window - 77%
of the limit. The transient had cleared at t~233s. The first domain's
budget ran out three seconds short of it.
Two round numbers, one behaviour: 5 attempts at 60s is 340s of patience
against today's 230s, so the same transient now has 107s of margin
instead of -3s, and a 23s connect sits at 38% of the window instead of
77%. LAM#1 (job 96179137200) is the near-miss that corroborates it - four
dead attempts, then a ~4s success on the fifth.
meta/tests.yml is required, not optional. roles/test-e2e-cli/tasks/run_one.yml:74
runs the script under `timeout {{ _cli_timeout }}`, and with no meta/tests.yml
this role fell through to the 3600s default in roles/test-e2e-cli/defaults/main.yml:3.
Widening the window moves the all-domains-fail ceiling from 16 domains to
11, and a 13-domain role demonstrably exists (Jellyfin#0, four passes of
"13 probed, 0 failed"). 7200 restores the headroom.
The `|| true` goes with it: the script runs under `set -uo pipefail` with
no -e, so the command substitution's exit code was already discarded and
line 63 branches on ${code}. tests/lint/filesystem/shell/test_no_or_true.py
never saw it because its regex wants #, ; or EOL after `true` and a `)`
follows here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
8bf29bd906
commit
069df39027
3 files changed
+6
-3
No files matched your search
@@ -57,9 +57,9 @@ probe() {
|
||||
fi
|
||||
while [[ "${attempt}" -le "${RETRIES}" ]]; do
|
||||
code="$(curl "${curl_proxy[@]}" --silent --show-error --location \
|
||||
--insecure --max-time 30 \
|
||||
--insecure --max-time 60 \
|
||||
-o /dev/null -w '%{http_code}' \
|
||||
"${scheme}://${domain}/" || true)"
|
||||
"${scheme}://${domain}/")"
|
||||
if [[ "${code}" =~ ^[234][0-9][0-9]$ ]]; then
|
||||
echo "${code}"
|
||||
return 0
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
cli:
|
||||
timeout: 7200
|
||||
@@ -1,5 +1,5 @@
|
||||
NGINX_SERVERS_DIR={{ lookup('nginx', 'directories.configuration.servers') }}
|
||||
RETRIES=6
|
||||
RETRIES=5
|
||||
SLEEP_SECONDS=10
|
||||
TOR_DNSMASQ_CONF={{ TOR_DNSMASQ_CONF }}
|
||||
TOR_SOCKS={{ lookup('tor_socks') }}
|
||||
Reference in new issue
Block a user