Commit Graph
19 Commits
Author SHA1 Message Date
evangelostsak a009f64b15 refactor(wireguard): name the compose host the mesh CLI gave no mesh 2026-10-18 01:01:08 +02:00
evangelostsak 8f105bae6a feat(wireguard): gate and size the tunnel against every dialled peer
The handshake gate already waits on every peer a non-hub interface holds.
The MTU probe and the path MTU targets now follow the dialled peers too, which
for a spoke is still its hub and in a full mesh is every peer.
2026-10-16 03:40:15 +02:00
evangelostsak 44c82ea547 refactor(wireguard): render the interfaces the inventory lists
The role reads networks.interfaces and keeps the map keyed by mesh name its
tasks and template already use.
2026-10-14 15:03:40 +02:00
evangelostsak 1b1be2378c refactor(wireguard): drop the rationale comments 2026-09-29 00:50:29 +02:00
evangelostsak f8aa7712fa fix(wireguard): probe the MTU against the hub's endpoint
The probe runs before the interface exists, so it has to reach the hub over
the underlay -- the same address the peer stanza dials.
2026-09-27 02:03:53 +02:00
evangelostsak bc9cad5f92 refactor(wireguard): drop the comment left behind by the install gate
It described a binary path probe that no longer exists in the role.
2026-09-26 15:19:13 +02:00
evangelostsak e2e09eda06 refactor(svc-net-wireguard): one private key, measured MTUs, no dead var
WIREGUARD_QUICK_BINARY went with the install gate that used it.
2026-09-25 22:35:29 +02:00
evangelostsak 6e1c72bb42 fix(wireguard): act only on the meshes this host belongs to
Declaring meta/meshes.yml made the validator accept the generated block, and
handed every host both meshes whether or not it is a member. The role then
rendered an interface for a mesh with no address and died in the template:
'object of type list has no attribute 1', from splitting an empty subnet.

The failure pattern named the cause exactly -- the NFS server failed on the
swarm mesh, the workers on the data mesh, and the manager, which belongs to
both, passed.

An entry the writer filled in carries an address; a declared-but-unassigned one
does not. That is what now separates a real membership from the shape the
contract declares.
2026-09-19 08:21:29 +02:00
evangelostsak c30ef534b1 fix(wireguard): prove the tunnel with the handshake, not with ping
The gate pinged its hub, and the NFS node ships no ping. The tunnel there was
healthy the whole time -- handshake 46 seconds old, 7.37 KiB in and 27.10 KiB
out -- and the deploy still failed, so the gate was reporting on its own
tooling rather than on the mesh.

wg reports the handshake directly: it needs nothing the host might not carry,
and it stays true where ICMP is filtered, which a tunnel gate must survive.
A peer that never completed one reports a literal 0.

The MTU probe still needs ping, because only a sized DF packet can show the
VXLAN-inside-WireGuard trap, so it is skipped rather than failed when ping is
absent. The handshake above already proves the tunnel; this proves the frame
size, and losing the second check is not worth failing a working deploy.
2026-09-18 23:22:49 +02:00
evangelostsak 7e45a85cbb fix(wireguard): gate on the direction the host can actually initiate
The gate had every host ping every peer it was configured for, which a hub can
never satisfy. Only the spoke carries an Endpoint; the hub learns a spoke's
address when that spoke dials in, so a hub probing its spokes is racing them.
The backup host settles it: deployed in a later play, its interface cannot
exist while the cluster play runs, so the manager's data mesh was unprovable by
construction.

Observed in a drill where both meshes were demonstrably healthy -- the workers
had handshakes and traffic on the swarm mesh, the NFS server on the data mesh
-- and the gate still failed on the manager and the NFS server.

A spoke now probes the hub and nothing else. That is the failure worth
catching: a spoke that cannot reach the hub has no mesh, while the hub's own
view converges as spokes arrive. The retry window widens because hosts
configure in parallel and a spoke can probe before the hub's interface
exists.
2026-09-18 19:01:12 +02:00
evangelostsak 85d05e2407 fix(wireguard): probe the tooling by path, not by a shell builtin
The guard used ansible.builtin.command with 'command -v wg-quick'. The command
module execs without a shell and 'command' is a shell builtin, so there is no
binary to exec, the probe reported a non-zero return code on every host, and
the install ran everywhere the guard existed to prevent it.

Verifying the probe through swarm-exec hid the bug, because that path does go
through a shell. stat has no such gap: it needs no shell and answers the
question directly.
2026-09-18 17:38:40 +02:00
evangelostsak b5cc14c90d feat(wireguard): resolve this host's meshes from the inventory
The role plans nothing; it reads what the cross-host writer already agreed on,
so a host can only configure peers that pass saw.

The private keys are looked up one literal path per declared mesh rather than
by building the path from the loop variable. A dynamic config path cannot be
resolved by the lookup validator, so it could not be proven correct before a
deploy -- and an unresolvable credential surfaces as an interface that renders
with an empty PrivateKey and never handshakes.
2026-09-18 10:34:01 +02:00
evangelostsak c40d7aa6da chore(wireguard): remove the role and its references to start fresh
The consolidated svc-net-wireguard role, its requirement document and the three
references that only existed to support it go away together: the lint ignore for
a load failure inside its tasks, the requirements index entry, and the tunnel
subnet variable nothing else consumed.

Left in place deliberately: the WireGuard mention in the svc-net category
description, which is upstream prose about networking roles in general rather
than anything this role owned.
2026-09-18 00:30:39 +02:00
evangelostsak 6524afc62a chore(svc-net-wireguard): trim comments, drop dead harness vars
Tighten verbose comments to one line each (no-long-comments) and remove
leftovers from the old mesh design: unused NODE_OCTET / WG_PORT and the
dead WIREGUARD_IMAGE/VERSION env asserts.
2026-07-09 13:47:46 +02:00
evangelostsak 4d2694afa2 feat(svc-net-wireguard): auto-derive client MTU via automtu
Replace the hardcoded 1400 client MTU with a pkgmgr automtu probe (path
MTU minus WireGuard overhead), falling back to the configured value when
probing is unavailable. Runs before the compose env is rendered so WG_MTU
reflects the derived value (decision 11).
2026-07-09 13:47:46 +02:00
evangelostsak 2f4ea68d14 test(svc-net-wireguard): rewrite e2e as deploy-driven full mesh
Replaces the linuxserver-image harness with a deploy-driven one: 01_bootstrap (6 empty containers + make install + DinD), 02_registration (per-host dedicated inventory via 'inventory provision' + full-mesh wg0.conf), 03_handshake ('deploy dedicated --id svc-net-wireguard' per host + all-pairs check). Adds the role's inventory-driven config path (mounts a per-host wg0.conf). NAT-flavor coverage follows once the mesh is green.
2026-07-09 13:47:46 +02:00
evangelostsak e242a28876 feat(svc-net-wireguard): flavor model, central subnet, NAT-on-host, beta lifecycle
Replaces mode+nat with a flavor list [server|client|nat]; declares the WireGuard internal subnet in group_vars/all/08_networks.yml; makes the masquerade task idempotent and applied on the deployed host (drops the DOCKER_IN_CONTAINER gate); bumps svc-net-wireguard and test-e2e-cli to lifecycle beta. (Revision 2 of req 026, PR #323 review.)
2026-07-09 13:47:46 +02:00
evangelostsak f99a0f87d9 style(svc-net-wireguard): trim verbose comments from harness and vars 2026-07-09 13:47:45 +02:00
evangelostsak 3cd7a8b69f feat(svc-net-wireguard): add Docker role meta and vars 2026-07-09 13:47:45 +02:00