feat(seitask): add provision-node for follower SeiNode fleets#419
Conversation
New `seitask provision-node` subcommand provisions N follower SeiNode CRs (named <base>-0..N-1), peer-wires them to a genesis SeiNetwork, waits for readiness, and publishes their endpoints into workflow-vars for the chaos suite. Genesis path (provision-snd) is untouched. - Fan-out N SeiNodes; stamp sei.io/role=node (+ sei.io/seinetwork when --network) on each CR object, byte-identical to seictl node apply, so node-list selectors resolve followers regardless of which tool created them. - Readiness before publish: PhaseRunning -> TM /status height>0 -> per-node eth_blockNumber 200 (the EVM listener binds after Running; no downstream step probes EVM, so the gate lives here). - Publish 5 workflow-vars keys: <ROLE>_EVM_RPC_LIST (N-node CSV), _EVM_RPC (node-0), _TM_RPC (node-0), _REST (node-0), CHAIN_ID. Runtime RBAC: requires seinodes create + seinodes/status get on the seitask-runner Role (both major-upgrade/rbac.yaml and the vendored runner/rbac.yaml) — must land with-or-before this ships. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryMedium Risk Overview The runtime in
Deploy note: the task creates Reviewed by Cursor Bugbot for commit ad94291. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ad94291. Configure here.
|
|
||
| if err := c.Create(ctx, node, fieldOwner); err != nil { | ||
| if !apierrors.IsAlreadyExists(err) { | ||
| return Result{}, taskruntime.Infra(fmt.Errorf("creating SeiNode %s/%s: %w", node.Namespace, node.Name, err)) |
There was a problem hiding this comment.
Runner RBAC missing SeiNode create
High Severity
The new provision-node path calls Create on SeiNode CRs, but runner/rbac.yaml still grants only get, list, and watch on seinodes. Any workflow step that runs this subcommand gets HTTP 403 on fan-out create and the task fails before readiness or workflow-vars publish.
Triggered by learned rule: Scenario workflows must have matching runner RBAC permissions
Reviewed by Cursor Bugbot for commit ad94291. Configure here.
…de RBAC (#420) * feat(seitask): WS-C — rpc scenario templates → SeiNode + provision-node RBAC - runner/rbac.yaml: grant seitask-runner `seinodes` create (provision-node's first act is c.Create(SeiNode); without it every rpc-fleet step 403s) + seinodes/status get (forward-compat, matches the /status pattern). - scenarios/{load-test,release-test}/rpc.yaml.tmpl: rewrite from a dead second `kind: SeiNetwork` (replicas:2) to a single `kind: SeiNode` fullNode follower; name/ns/ownerRef/labels/peers stamped by provision-node at runtime. Pairs with platform WS-C (chaos workflows → provision-node) and consumes the merged provision-node (#419) + SeiNode.status.endpoint (#418). HARD GATE before merge: dry-run the rendered SeiNode template against the DEPLOYED CRD (`seictl node apply … --dry-run`) — envtest only covers the repo CRD, not the live one. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(seitask): move rpc.yaml.tmpl render-clean guard to provisionnode The WS-C rewrite of scenarios/{load-test,release-test}/rpc.yaml.tmpl from kind: SeiNetwork to kind: SeiNode broke provisionsnd's TestBundledTemplates_RenderClean, which strict-unmarshals every bundled template as a SeiNetwork (rendered SeiNode has top-level spec.chainId, an unknown field on SeiNetworkSpec). - provisionsnd test: drop the rpc.yaml.tmpl case — it only owns the SeiNetwork genesis/validator templates now. - provisionnode test: add TestBundledTemplates_RenderClean covering both rpc.yaml.tmpl, asserting they render + strict-unmarshal as a SeiNode (spec.chainId set, spec.fullNode present). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>


What
New
seitask provision-nodesubcommand: provisions N follower SeiNode CRs (<base>-0..N-1), peer-wires them to a genesis SeiNetwork, waits for readiness, and publishes their endpoints intoworkflow-varsfor the chaos suite. The genesis path (provision-snd→ SeiNetwork) is untouched — this is purely additive.Why
The migration off
SeiNodeDeploymentsplit provisioning into genesis (SeiNetwork, already done byprovision-snd) and the follower/RPC fleet (SeiNode), which had no provisioning path. The chaos suite needs an EVM load target that is a follower — genesis validators runModeValidatorand don't serve EVM.Design
sei.io/role=node(+sei.io/seinetwork=<net>when--network) on each CR object — byte-identical toseictl node apply, sonode list -l sei.io/seinetwork=<net>,sei.io/role=noderesolves followers regardless of which tool created them. (ControllerResourceLabelsonly stamps pods, never the CR.)PhaseRunning→ TM/statusheight>0 → per-nodeeth_blockNumber200. The EVM listener binds after Running (status is discoverability, not serve-readiness) and no downstream step probes EVM, so the gate lives here.<ROLE>_EVM_RPC_LIST(N-node CSV),_EVM_RPC(node-0 scalar),_TM_RPC(node-0),_REST(node-0),CHAIN_ID.provision-nodeneedsseinodescreate +seinodes/statusget on theseitask-runnerRole. Current grant is get/list/watch only. The grant must be added to bothclusters/harbor/nightly/major-upgrade/rbac.yamland the vendoredrunner/rbac.yaml(kept-in-sync) — see the platform-side migration (WS-C). Do not wireprovision-nodeinto a nightly workflow before that grant merges, or every fan-out step 403s on create.Tests
Fan-out naming, object-label stamping (incl. no-network case omits the network label), readiness gating (publish blocked while the EVM dial fails even at TM height>0), workflow-vars assembly, empty-guards.
provisionnode81% coverage.make manifests generate→ no diff (CLI/runtime only). Idiom review: clean, no correctness findings.Provenance
Design + cross-review in the migration workspace (WS-B LLD; xreview ledger RESOLVED R1→R2, dissent lifted). Pairs with the seictl
network/nodesplit (WS-A).🤖 Generated with Claude Code