mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
fix(pretix): send a Host header the app accepts from its healthcheck
container_hostname is computed for sethostname(2) and clamped to 63 chars
(plugins/lookup/container_hostname.py). pretix's onion domain is 74, so the
lookup degrades to the bare entity name 'pretix' -- and container_healthcheck
forwards that value into the curl probe's Host header.
pretix gates on Host in MultiDomainMiddleware, not in ALLOWED_HOSTS (settings.py
hardcodes ALLOWED_HOSTS = ['*']). It accepts the site domain, a KnownDomain, or
one of LOCAL_HOST_NAMES = ('testserver', 'localhost'); everything else gets a
400. The probe could therefore never pass, swarm killed the task with exit 137
and the stack never converged -- Pretix 0 of run 31340965955.
A/B against pretix/standalone, same volume and same PRETIX_PRETIX_URL, probe run
by Docker itself, only the header differing:
Host: pretix -> curl (22) 400 x4, unhealthy streak=6
Host: localhost -> exit 0 x3, healthy
The Tcp flavor already hardcodes Host: localhost for the same reason; curl was
the outlier. Reusing a kernel hostname as an HTTP Host is the underlying design
bug, but defaulting the curl probe would change six roles' probes at once, so it
stays a separate change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a94a7ec73e
commit
e9817f8254
1 file changed
+1
@@ -42,6 +42,7 @@ postgres:
|
||||
pretix:
|
||||
healthcheck:
|
||||
flavor: curl
|
||||
hostname: localhost
|
||||
modes:
|
||||
compose:
|
||||
enabled: true
|
||||
|
||||
Reference in new issue
Block a user