ff08677d12be8c4b16d57143d539472348929720
## Summary New Swarm stack `connectivity_tester` — a long-running Python service that probes the cluster's connectivity every 10 minutes and logs structured PASS/FAIL per check. ## What's in the box - `connectivity_tester/Dockerfile` — python:3.12-slim base - `connectivity_tester/app.py` — main loop: read env, run round, sleep, repeat - `connectivity_tester/endpoints.py` — `EXPECTED_INTERNAL`, `EXPECTED_EXTERNAL`, `NEGATIVE` lists - `connectivity_tester/stack-compose.yml` — Swarm stack with `mode: global` (one task per node) ## Behaviour - One round every `PERIOD_SECONDS` (default 600). - Per round: TCP probes against the three allow-lists + the negative-list. - Negative-list endpoints (cloud metadata services etc.) MUST NOT respond. If they do → log `ERROR LEAK`, container keeps running. - `EXTRA_ENDPOINTS` env var accepts comma-separated `host:port` pairs for ad-hoc checks. ## Placement `mode: global` — Swarm schedules one task on each node. No node pinning. Networks: `hermes_proxy` overlay (for internal DNS resolution) + `default` (for egress via squid). ## Acceptance - After deploy, `docker service logs connectivity_tester_connectivity-tester` shows one round per 10 minutes. - Logs visible at info level in normal conditions (squid, hermes-gateway, etc. all PASS). - Any unexpected reachability or unreachable internal endpoint triggers ERROR-level log within `CHECK_TIMEOUT_S`. ## Related - Org1/hermes-voice-gateway#3 (Path B: build custom voice-gateway) — blocked by Org1/hermes-voice-gateway#5 (connectivity testing container) - Org1/hermes-voice-gateway#5 — this PR resolves the blocker ## Verification checklist - [ ] Stack `connectivity_tester` shows up in `docker stack ls` - [ ] `docker service ps connectivity_tester_connectivity-tester` shows one task per node (odroid, rudolf-T, xu4) - [ ] Logs show first round within 30 seconds of start - [ ] `docker service logs --tail 50 connectivity_tester_connectivity-tester` shows PASS for at least squid:3128 and hermes-gateway:8000 - [ ] Negative-list (169.254.169.254) is unreachable (PASS OK-NEG) --------- Co-authored-by: brencher_bot <rudolfss13@gmail.com> Co-authored-by: hermes <hermes@rudolf.keenetic.link> Reviewed-on: admin/ansible#39 Co-authored-by: hermes <rudolfss13+hermes@gmail.com>
Description
No description provided
11 MiB
Languages
Python
46.4%
Jinja
32.6%
Shell
14.4%
Dockerfile
6.6%