fix(cli): emit namespace-relative static-nodes hostnames - #303
Merged
Conversation
Static-nodes entries embedded the deployment's own namespace, so a network restored into a differently named namespace kept pointing every enode at the original deployment: consensus never resumed and RPC nodes waited forever on a dependency that would not appear (BC/DR finding I-9, PRD-13096). - --static-node-namespace is deprecated and ignored; hostnames stay relative (besu-validators-0.besu-validators) and resolve through the pod DNS search list, which is identical at deploy time and namespace-agnostic on restore. - A cluster-scoped --static-node-domain (svc.*, *.cluster.local, including namespace-smuggling forms like network.svc.cluster.local) is dropped with a warning; it only resolves alongside a namespace segment. Non-cluster suffixes are still appended. - New --static-node-fqdn opts back into the fully qualified form. It requires --static-node-namespace and warns that the namespace is pinned. Hostname resolution runs before key generation so unusable combinations fail fast, and warnings go to stderr to keep screen output consumable. Claude-Session: https://claude.ai/code/session_01FXPrQuEEnF32SBEFwEuEp8
|
To view in Slack, search for: 1787312915.554219 |
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.
What
Static-nodes entries no longer embed the deployment's own namespace.
--static-node-namespaceis deprecated and ignored. Hostnames stay relative —besu-validators-0.besu-validators— and resolve through the pod's DNS search list.--static-node-domainis dropped with a warning:svc.*, anything ending incluster.local, and namespace-smuggling forms such asnetwork.svc.cluster.local. It only resolves alongside a namespace segment, so keeping it would produce an unresolvable host. Non-cluster suffixes (example.com) are still appended.--static-node-fqdnopts back into the fully qualified form. It requires--static-node-namespace(hard error, exit 1, otherwise) and warns that the namespace is pinned.-o screenoutput stays consumable.Why
BC/DR finding I-9 (PRD-13096): distributed-ledger addresses embed the deployment's own environment name. Recovered into a differently named namespace, every enode points back at the original deployment — ledger data and identity restore correctly, but consensus never resumes and RPC nodes wait indefinitely on a validator that will never appear. It presents as a successful restore of a stalled chain.
The chart-side fix (
besu-stackinSettleMint-Collaboration/besu-helm) does not cover deployments that supply raw enode URLs viastaticNodes.raw— this repository is the second, independent producer of the same defect. This PR is step 3 of that issue's work breakdown.The generated list only ever names its own namespace, so a namespace-relative hostname is semantically identical at deployment time and correct after a restore anywhere.
Blast radius
No repository in the fleet passes
--static-node-namespacefrom a chart or script — checkeddalp,besu-helm,deployment-rer,deployment-ocbc. It is operator-typed (docker run … generate), so the change takes effect on the next image pull without any chart edit. Operators who keep passing the flag get a warning and the corrected output rather than a failure.Existing
staticNodes.rawlists already pasted into values files (for exampledeployment-ocbc/values-ibft-sit.yaml) still carry pinned FQDNs — they need regeneration, or the DR-suite rewrite step, which stays in place per step 5 of the issue.No chart or version bump: this repository has no
charts/directory, andtools/version.tsstampspackage.jsonfrom the release tag in CI.Commands run
bun test— 119 pass, 0 failbun run typecheck— cleanbun run check— cleanbun run docs:cli— README regeneratedCLI output
Tests
Five new cases in
bootstrap.command.test.ts: default drop plus both warnings, non-cluster domain kept, smuggled-namespace domain dropped,--static-node-fqdnwithout a namespace rejected, and the FQDN opt-in warning. Two pre-existing tests now pass--static-node-fqdnto keep coverage of the fully qualified form.Closes step 3 of PRD-13096.
https://claude.ai/code/session_01FXPrQuEEnF32SBEFwEuEp8