You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(spurctld): pin jwt_key and interval_secs to startup; scope reconfigure to leader
Three correctness fixes on top of the live-reload work:
- auth.jwt_key is now restart-only. Node tokens are HS256-signed with it
(7-day TTL) and verified per-RPC; swapping the key live would instantly
reject every outstanding node token and silently partition healthy nodes.
ControllerService captures the key once at startup (resolve_startup_jwt_key)
and verification uses that pinned value, mirroring Slurm's restart-only
AuthType. admission.mode stays live (flipping it invalidates nothing).
- scheduler.interval_secs is now pinned everywhere. The scheduler loop
already captured it once at boot; the preemption requeue hold read it live
from config(), so post-reconfigure the hold window drifted while the loop
cadence did not. Capture it in ClusterManager at construction and read the
pinned value, keeping interval_secs truly restart-only.
- reconfigure is documented as leader-only. It runs on the Raft leader and
swaps only the leader's in-memory config; no WAL entry carries config, so
followers keep their startup config until restart (in k8s they re-read the
same ConfigMap). Even a partition edit that propagates via WAL makes
followers reconcile against their own stale config().nodes, so they get new
partition membership but old node features until restart. Clarified in the
reconfigure doc comment, CLI help/output, partitioning.rst, and
kubernetes.rst. WAL-propagating config is a planned follow-up.
Tests: reconfigure_does_not_adopt_new_jwt_key builds a real ControllerService,
reconfigures the key, and proves a token minted with the startup key still
verifies (and would fail under the new key). The max_batch_requeue test now
drives maybe_requeue past the cap and asserts the consumer requeues after the
new cap is applied, rather than only checking the swapped config value.
Co-Authored-By: Claude <noreply@anthropic.com>
"Reconfiguration complete (listen ports, accounting DB, and raft peers still require a controller restart)"
1484
+
"Reconfiguration complete on the leader (followers converge on restart; listen ports, accounting DB, raft peers, and jwt_key still require a controller restart)"
0 commit comments