Repository navigation
isb 4.1.0: pin instance addresses on org bridges, net.failed, mattermost channels - #80
Merged
knowsuchagency merged 4 commits intoNov 9, 2026
Conversation
From the 2026-11-09 incident (a new instance in org exa got the address analytics-postgres had held since 10/12): incus' bridges lease for an hour and an OCI container never renews, so dnsmasq re-hands its address. - isb pins eth0's ipv4.address at create (sandboxes, stack replicas, build sandboxes) on an address no instance on the bridge holds or is pinned to, and records it in user.isb.ipv4.eth0. A per-process reservation covers creates in flight; after the create the address is checked again and moved before first start if another process took it (incus accepts two NICs pinned to one address, then refuses to start either). - isb serve checks every org bridge each minute: pins an unpinned instance at the address it has, in place (no restart), gives a stopped one a free address, and adopts pins set by hand (the live stopgap's). It raises net.failed when two instances hold one address, when a pinned instance has another, or when one cannot be pinned. It moves no instance itself. - The diff ignores isb's pin on a NIC whose spec names no address and never prunes it. Egress bridges (one sandbox each) stay on DHCP. Tests: unit tests for the subnet, claims and plan; tests/ipam.rs against a real incusd in a throwaway org. Claude-Session: https://claude.ai/code/session_01LJ21XsZE86ywhpFMvYVWmE
…ver)
The slack provider takes only hooks.slack.com, and Mattermost answers the
generic webhook body with 400. `mattermost` posts {"text": ...} (the title
in bold) to an incoming-webhook URL on any server, https only, and puts a
zero-width space after every @ so event text never pings anyone. CLI
--mattermost, the channel_create tool, the web UI's channel dialog and the
docs know it.
Claude-Session: https://claude.ai/code/session_01LJ21XsZE86ywhpFMvYVWmE
…euse-duplicate-ips-across-instances
Claude-Session: https://claude.ai/code/session_01LJ21XsZE86ywhpFMvYVWmE
knowsuchagency
marked this pull request as ready for review
November 9, 2026 11:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the 2026-11-09 incident: a new instance in org exa (mcp-gateway-1-2ee0) got 10.83.115.43, which analytics-production-analytics-postgres-1-0a5e had held since 10/12; analytics ingestion and web broke from ~09:41Z until the gateway moved. incus' bridges lease for an hour and an OCI container never renews, so dnsmasq re-hands its address.
What changes
eth0'sipv4.addresswhen it creates an instance in an org project (sandboxes, stack replicas, build sandboxes), on an address no instance on the bridge holds (in state) or is pinned to, and records it inuser.isb.ipv4.eth0. A per-process reservation covers creates in flight; after the create the address is checked again and moved before first start if another process took it. (incus accepts two NICs pinned to one address, then refuses to start either, so this check matters.)isb serve. Pins an unpinned instance at the address it has, in place (verified: same PID, same address); gives a stopped one a free address; adopts pins set by hand, which takes over the live stopgap's 59 overrides. Raisesnet.failed(matches*.failed, so thejessicachannels hear it) when two instances hold one address, when a pinned instance has another address, or when one can't be pinned. It never moves an instance itself.ipv4.dhcp.expiry=infinite. With pins, lease expiry no longer matters. Changing the bridges would restart dnsmasq in every org and keep the leases of deleted instances forever.isbbrx*, one sandbox each) stay on DHCP.Also: a
mattermostnotification providerThe
slackprovider accepts only hooks.slack.com, and Mattermost rejects the generic webhook JSON with a 400.mattermostposts{"text": ...}(title in bold) to an incoming-webhook URL on any server. It is https only, and every@gets a zero-width space so event text never pings. Supported in the CLI (--mattermost), the tool, the web UI's channel dialog, and the docs.Tests
tests/ipam.rsagainst titan's incusd in a throwaway org (deleted afterwards): pin at create with unique addresses, a pruning plan is a no-op, an instance made behind isb's back is pinned in place without a restart, adopt, a stopped instance gets a free address, a hand-pinned duplicate is reported and not adopted.scripts/check.sh, web lint and the web tests pass.https://claude.ai/code/session_01LJ21XsZE86ywhpFMvYVWmE