0119 review: rollback needs the private network unassigned first; a configuration written back is retired again with the first original kept; only the interface's own file, never a link

This commit is contained in:
jochen
2026-09-27 00:53:13 +02:00
parent 9cb8373ba0
commit cfb7baaf1b
@@ -64,8 +64,17 @@ is removed from where its unit reads it.**
carries the same key, port, address and peers. carries the same key, port, address and peers.
- A take that is never proven — no peer ever handshakes — keeps the found configuration, and the - A take that is never proven — no peer ever handshakes — keeps the found configuration, and the
node says so, so a broken take is visible rather than silently retired. node says so, so a broken take is visible rather than silently retired.
- Rolling back to the predecessor's tunnel becomes a deliberate act: copy the kept original back - Rolling back to the predecessor's tunnel becomes a deliberate act, in this order: **unassign the
and start its unit. The mesh does neither. private network first**, then copy the kept original back and start its unit. The mesh does
neither. While the private network is still assigned, the tunnel is the mesh's: a restored
configuration is held and retired again at the next proven apply, and the found unit cannot
bind the port the mesh's interface holds. The node says so when it happens.
- A configuration something keeps writing back — the predecessor's own tooling, say — is retired
again each time it appears, but the first original stays the one kept; a different content is
kept once beside it, and the node reports that the configuration came back.
- The host retires only the found interface's own configuration file (`/etc/wireguard/<iface>.conf`),
never a path the mesh writes, and never a link: a configuration that is a link to somewhere else
is left, with its target, for a person to retire.
- 0105's "its configuration stays on disk, kept like any held file" holds until the take is proven, - 0105's "its configuration stays on disk, kept like any held file" holds until the take is proven,
and not after. and not after.