Repository navigation
fix: let Tenderdash restart itself during a Core-only replacement - #37
Conversation
Tenderdash exits when Core's RPC goes away and Docker restarts it. A managed Core upgrade on a validator then failed `preserved-service-changed` after Core had already been replaced, because every unselected service had to match the plan snapshot including its start time and restart count. Resume ran the same check and failed the same way, and the journal refused any other plan for the network until that operation completed. When Core is selected, an unselected Tenderdash may now differ in start time and restart count only. It must be the same container, image, digests and configuration, its restart count must not go down, and the fleet check also requires it running. No other service may restart, and Tenderdash may not unless Core is selected. The worker recipe changes, so a plan made by the previous executor is accepted by this one (both digests pinned). That lets an operation the old check stopped resume under the plan it journaled. Seen on testnet on 2026-11-20 (console operation 631fe5e6): both canary evonodes were healthy on the new Core and the operation could not finish. Prepared by infraclaw (Claude Code) for ktechmidas. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
A managed Core-only upgrade on a validator can fail after Core has already been replaced, and then cannot be finished.
Tenderdash exits when Core's RPC goes away, and Docker restarts it. The worker (
operation_guard,assert_baseline) and the fleet check (Preserved) require every unselected service to equal the plan snapshot, includingstartedAtandrestarts. So if a Platform block arrives while Core is away, the operation stops withpreserved-service-changed. Resume runs the same comparison and fails the same way. The journal stays inapplying, andRunnerrefuses any other plan for the network until that operation completes.Seen on testnet on 2026-11-20, console operation
631fe5e6: two canary evonodes were healthy on Core 24.0.2, the operation failed, and testnet operations were blocked.Change
coreis selected, an unselected Tenderdash may differ from the baseline in start time and restart count only. It must be the same container, image, digests and configuration, and its restart count must not go down. The fleet check also requires it running. The worker does not, because Tenderdash can be mid-restart at that instant and the readiness gate that follows covers it.Plan.Validateaccepts a plan bound to the previous recipe digest. Both digests are pinned, so the allowance ends with the next recipe change. Without it, an operation the old check stopped could not resume under its journaled plan.Verification
TestCoreUpgradePermitsOnlyTenderdashSelfRestart,TestPreviousRecipePlanStaysResumable,test_core_replacement_permits_only_tenderdash_self_restart.CGO_ENABLED=0, so no-race):gofmt -l cmd internalclean,go vet ./...clean,go test ./...ok, and thenode,managedandseedtlsPython suites ok.631fe5e6resumed and succeeded, theneef9f8eb,8e40d024and37c66221took the other 27 evonodes to Core 24.0.2. Tenderdash restarted itself on 2 of the 29 nodes.Not covered
3b6d795. It needs an engine bump after this merges.dashmate restart --platform) is still reported as drift. That is intended.Prepared by infraclaw (Claude Code) for @ktechmidas.
🤖 Generated with Claude Code
Summary by CodeRabbit