Sidecar config-apply should populate chain-id in client.toml
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
Research direction
Start in seictl's internal/task/config-apply and inspect the existing seictl config patch --target client machinery, then trace how spec.chainId enters the bootstrap context. Add coverage for setting, empty, and conflicting chain IDs, plus the empty-volume path; done means config-apply is idempotent and a fresh volume reaches committed state without the chain-id panic.
Written by the indexing model from the issue text.
Description
Problem
When a SeiNode is first deployed against a freshly-mounted BYOV data volume that doesn't already contain a config/client.toml, the cosmos-sdk seid init (run from the seid-init initContainer) writes a client.toml with chain-id = '' (empty).
On the next boot of the main seid container, the cosmos-sdk startup invariant compares genesis.json's chain_id against client.toml's chain-id and panics if they differ:
panic: genesis file chain-id=pacific-1 does not equal config.toml chain-id=
The sidecar's config-apply task currently rewrites config.toml and app.toml to match the desired controller-side config, but does not populate chain-id in client.toml from spec.chainId — so first-boot ends in a guaranteed crashloop until an operator intervenes.
Impact
- Crashloop blocks every fresh archive node deployment. Hit during pacific-1/archive-1 redeploy (PR sei-protocol/platform#519) — pod sat in
CrashLoopBackOffuntil live patch viakubectl debugephemeral container. - Workaround required for archive-2 redeploy: pre-seeded
client.tomldirectly on the EBS volume before mounting (PR sei-protocol/platform#540), bypassing the controller's responsibility. - Future BYOV deployments will hit this on every first boot unless someone remembers the workaround, defeating the controller's "give me a chain + a volume and I'll run it" contract.
Relevant experts
- @bdchatham (controller contributor, hit the bug twice in the field)
- kubernetes-specialist (sidecar / seictl ownership)
Proposed approach
In the seictl sidecar's config-apply task, after rewriting config.toml/app.toml, also patch /sei/config/client.toml:
chain-id = "<spec.chainId>"
Use the same seictl config patch --target client machinery the sidecar already has. The chain ID is already in the bootstrap context (SeiNode.spec.chainId), so no new spec fields needed.
Verification: e2e test that boots a SeiNode against an empty data volume and asserts seid reaches committed state (not panic) without manual intervention.
Acceptance criteria
- Sidecar's
config-applytask writeschain-idintoclient.tomlfromspec.chainId(idempotent — re-running config-apply with the same chainId is a no-op) - If
client.tomldoesn't exist on disk yet (first boot before cosmos-sdk has run),config-applyeither creates it with reasonable defaults includingchain-id, or defers and re-runs after cosmos-sdk creates the skeleton - Unit test for the new patch behavior (chainId set, empty, conflicting value)
- No regression on existing archive nodes that already have a working
client.toml
Out of scope
- Other unpopulated client.toml fields (
keyring-backend,node, etc.) — these have sensible cosmos-sdk defaults; onlychain-idis the panic-trigger - Live migration / patching of already-deployed nodes — they have working
client.tomlalready from the manual workaround; this is for future deployments
References
- sei-protocol/platform#519 — archive-1 redeploy where this was first hit
- sei-protocol/platform#540 — archive-2 redeploy where it was pre-empted via volume-level seeding
- Cosmos-SDK startup panic:
sei-cosmos/server/start.go:200(StartCmd.func2— genesis-vs-config chain-id check) - Sidecar code likely at:
internal/task/config-apply(in seictl)
- Dominant language
- Go
- Stars
- 1
- Forks
- 2
- Avg merge
- 2h 29m
- Merged PRs (30d)
- 56
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sei-protocol/sei-k8s-controller
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
sei-protocol/sei-k8s-controller#457 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
All issues in sei-protocol/sei-k8s-controller
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100