From e3afec4e702a05f4fb4875e2a9acad36c83f488b Mon Sep 17 00:00:00 2001 From: anti Date: Wed, 29 Apr 2026 00:15:39 -0400 Subject: [PATCH] feat(mutator): live network.disconnect for apply_detach_decky MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Symmetric to apply_attach_decky — after deleting the multi-home edge from the DB, calls the docker SDK to drop the base container's interface in the now-detached LAN. Service containers lose visibility automatically (they share the base's netns). Idempotency: 'not connected' / 'no such' APIError is logged at info and treated as success. --- decnet/mutator/ops.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/decnet/mutator/ops.py b/decnet/mutator/ops.py index 434e360c..64c30fce 100644 --- a/decnet/mutator/ops.py +++ b/decnet/mutator/ops.py @@ -758,6 +758,14 @@ async def apply_detach_decky( decky["uuid"], {"decky_config": new_cfg} ) await repo.delete_topology_edge(edge["id"]) + # Live materialisation: SDK network.disconnect on the base + # container. Service containers automatically lose visibility into + # the LAN because they share the base's netns. + await _materialise_decky_disconnect( + repo, topology_id, + decky_name=decky["decky_config"]["name"], + lan_name=lan["name"], + ) await _assert_valid_after(repo, topology_id)