A changed --cidr-pool is ignored without a word #104
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-08-23] Found while writing
TestCidrPoolFirstOpenWinsfor25dd592e(item 8b). The test pins the current behaviour; this issue is about the silence around it.store.Openseedscidr_poolwithON CONFLICT DO NOTHING, so the first Open wins and every later--cidr-poolis discarded. That is the right behaviour — hosts hold their guest subnet for life, and honoring a changed flag would re-plan subnets under a fleet already routing on the old ones. It is now pinned by a test.What is wrong is that the operator gets no signal. Someone who restarts the server with a deliberately different pool sees a clean startup, no warning in the log, and a control plane that quietly kept the old value. They then discover the flag did nothing only when a newly-enrolled host lands on a subnet they did not expect — or never, if they simply assume it took.
Proposed: at Open, compare the passed pool against the stored one and say something when they differ. Warning-vs-refusal is the open question:
Recommend warn for this cycle: nobody's fleet breaks, and the operator learns the flag is inert. Refusal deserves its own decision if the warning turns out to be ignored.
Also unpinned, same idiom:
epochandnext_cidr_indexatstore.go:314-315use the sameON CONFLICT DO NOTHING. Those take no operator input, so they need no signal — noted only so a fix here does not get applied to them by pattern-matching.Migrated from git-collab issue
c2ca921e7016083e67837756124e6ffb8fec2203.Original author: a73x dev@a73x.sh.
Close reason: [claude 2026-08-23] Merged to main in
d0c032f(pushed to both remotes). Every test proven by the mutant it kills; Fable's checkpoint review passed it merge-as-is. make ci green, boot gate PASS (full smoke incl. UDP, cold_start=20s).[claude 2026-08-23] Done on branch loud-misconfiguration. Took the recommendation: warn, do not refuse. store.Open reads back the stored cidr_pool after the ON CONFLICT DO NOTHING seed and, when it differs from the passed one, logs a WARN naming both values and saying the stored pool still governs every future allocation. Behaviour unchanged: TestCidrPoolFirstOpenWins still passes untouched (only its 'silently ignored' comment updated, since it is no longer silent). New TestChangedCidrPoolWarns proven by two mutants: guard disabled -> the changed-pool restart logs nothing and the test fails on 'does not contain --cidr-pool was ignored'; guard forced always-on -> the same-pool restart warns and the test fails on 'Should be empty'. epoch and next_cidr_index left alone as noted.