6 Commits
Author SHA1 Message Date
db6a79e1d0 [ready-to-test] connectivity: probe Swarm host ports and Telegram egress (#49)
Adds per-node checks for Swarm TCP/UDP ports, NFS reachability, and direct Telegram API egress. Scope is connectivity_tester and hermes-related network diagnostics only.

---------

Co-authored-by: hermes <hermes@rudolf.keenetic.link>
Co-authored-by: brencher_bot <rudolfss13@gmail.com>
Reviewed-on: #49
Co-authored-by: Alex Rudenk <rudolfss13+hermes@gmail.com>
2026-10-08 15:44:54 +02:00
hermes 1de62b3385 feat(connectivity): verify Hermes relocation prerequisites (#50)
Checks node-local prerequisites that break Hermes after relocation: direct TLS egress to api.telegram.org and real NFS read/write against the Hermes agent export. Removes the tester self-probe that caused every round to crash.

Tests: compileall, unittest, git diff --check.
Reviewed-on: #50
Co-authored-by: Alex Rudenk <rudolfss13+hermes@gmail.com>
2026-10-05 19:58:37 +02:00
74c3b435e8 feat(connectivity): deploy tester on all swarm nodes (#48)
## Summary
Add the connectivity_tester deployment from the Hermes release branch to admin/master.

## Changes
- add the connectivity_tester stack and Brencher integration
- dispatch the multi-arch image build to Gitea Actions
- publish the image to the admin registry
- deploy with registry authentication forwarded to Swarm nodes

## Verification
- Actions build completed successfully
- Swarm runtime verified on odroid, xu4, and rudolf-T
- 3/3 tasks running

Source branch: `hermes/ansible@release/0.1.0-connectivity`

---------

Co-authored-by: hermes <hermes@rudolf.keenetic.link>
Co-authored-by: brencher_bot <rudolfss13@gmail.com>
Reviewed-on: #48
Co-authored-by: Alex Rudenk <rudolfss13+hermes@gmail.com>
2026-09-29 23:15:21 +02:00
hermes e3f195f4bc fix(connectivity_tester): publish to admin registry (#42)
release / build (push) Successful in 1m57s
Publishes the connectivity_tester image to the admin repository registry where the workflow runs.

Tracking: admin/ansible#16
Reviewed-on: #42
Co-authored-by: Alex Rudenk <rudolfss13+hermes@gmail.com>
2026-09-21 19:14:36 +02:00
hermes 9436806f78 ci: build connectivity tester from admin branches (#41)
release / build (push) Failing after 32s
## Changes

- add the release workflow to `admin/ansible`
- trigger builds for `auto-*` branches in the administrative repository
- build and push `gitea.rudolf.keenetic.link/hermes/connectivity_tester`
- update the stack image to the same registry target

This is required by Brencher after auto-branches are pushed to `gitea_admin`.

Reviewed-on: #41
Co-authored-by: Alex Rudenk <rudolfss13+hermes@gmail.com>
2026-09-20 13:58:38 +02:00
ff08677d12 feat(connectivity_tester): new stack for synthetic connectivity checks (#39)
## 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: #39
Co-authored-by: hermes <rudolfss13+hermes@gmail.com>
2026-09-20 13:26:07 +02:00