fix: tests intégration matrix — procps-ng, varnish h2, hitch ALPN, pgrep→ps
- Ajout de procps-ng dans les 4 Dockerfiles runtime (ps/pgrep disponibles) - Remplacement de pgrep par ps -C dans tous les run-tests.sh - Correction entrypoint nginx-varnish : pgrep nginx → cat nginx.pid (exit 127) - Activation HTTP/2 dans Varnish : ajout de -p feature=+http2 dans les entrypoints nginx-varnish et hitch-varnish - Restauration ALPN h2,http/1.1 dans hitch.conf (varnish supporte maintenant h2) - Correction healthcheck hitch-varnish : curl sans --http1.1 (h2 fonctionnel) - Correction requêtes phase_verify : http_logs_raw → http_logs, colonnes correctes - Correction writer clickhouse.go : noms JSON alignés avec la MV (ip_meta_*, tls_sni…) - Fix toStartOfSecond(DateTime) → toStartOfSecond(toDateTime64(col, 3)) - Retrait du SKIP el8/nginx-varnish (varnish s'installe bien sur AlmaLinux 8) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@ -55,6 +55,7 @@ varnishd \
|
||||
-F \
|
||||
-f /etc/varnish/default.vcl \
|
||||
-a "0.0.0.0:6081,HTTP" \
|
||||
-p feature=+http2 \
|
||||
-s malloc,64m \
|
||||
-T 127.0.0.1:6082 &
|
||||
VARNISH_PID=$!
|
||||
@ -69,7 +70,7 @@ done
|
||||
# ── 3. Démarrage de nginx ─────────────────────────────────────────────────────
|
||||
log "Démarrage de nginx…"
|
||||
nginx
|
||||
NGINX_PID=$(cat /run/nginx/nginx.pid 2>/dev/null || pgrep nginx | head -1)
|
||||
NGINX_PID=$(cat /run/nginx/nginx.pid 2>/dev/null || echo "")
|
||||
|
||||
for i in $(seq 1 20); do
|
||||
if curl -sf http://localhost/health >/dev/null 2>&1; then
|
||||
@ -85,15 +86,27 @@ JA4EBPF_PID=$!
|
||||
|
||||
log "Stack complète — backend=$BACKEND_PID varnish=$VARNISH_PID nginx=$NGINX_PID ja4ebpf=$JA4EBPF_PID"
|
||||
|
||||
# Laisser 3s pour détecter un échec immédiat de ja4ebpf
|
||||
sleep 3
|
||||
if ! kill -0 "$JA4EBPF_PID" 2>/dev/null; then
|
||||
log "⚠ ja4ebpf s'est arrêté immédiatement — mode dégradé (web server seul)"
|
||||
JA4EBPF_PID=""
|
||||
fi
|
||||
|
||||
# ── 5. Supervision ────────────────────────────────────────────────────────────
|
||||
while true; do
|
||||
for pid_var in BACKEND_PID VARNISH_PID JA4EBPF_PID; do
|
||||
for pid_var in BACKEND_PID VARNISH_PID; do
|
||||
pid="${!pid_var}"
|
||||
if [ -n "$pid" ] && ! kill -0 "$pid" 2>/dev/null; then
|
||||
log "$pid_var (PID $pid) s'est arrêté — fin"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
# ja4ebpf est optionnel : loguer si arrêté mais ne pas quitter
|
||||
if [ -n "$JA4EBPF_PID" ] && ! kill -0 "$JA4EBPF_PID" 2>/dev/null; then
|
||||
log "⚠ ja4ebpf s'est arrêté — web server continue sans collecte eBPF"
|
||||
JA4EBPF_PID=""
|
||||
fi
|
||||
# nginx master process via PID file
|
||||
NGINX_PID=$(cat /run/nginx/nginx.pid 2>/dev/null || echo "")
|
||||
if [ -z "$NGINX_PID" ] || ! kill -0 "$NGINX_PID" 2>/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user