recovery drill#297
Merged
Merged
Conversation
Nexus blocked in InitializeBackingStoreFromKeepers, an infinite retry loop, before ever starting its mTLS listener. When every Keeper lost its shard, that deadlocked the break-the-glass flow: the operator restore endpoint is the documented way out of exactly that state, but an un-initialized Nexus was not listening, so `spike operator restore` had nothing to talk to. The routing layer already anticipated serving in this state (route/base exempts the operator recover/restore emergency routes from root-key validation and answers everything else with "not ready"), so the listener never coming up was purely a boot ordering bug. Run the Keeper-based recovery in a background goroutine so main can start the server immediately. Additionally, the recovery loop now stands down as soon as a root key is present, so a successful operator restore hands over to the periodic shard sync instead of polling the Keepers forever. Found and verified live by the new recovery drill (hack/bare-metal/drill/recovery-drill.sh): before the fix, the drill's shard feeds could never reach Nexus; after it, two of three shards restore the system and a pre-crash secret reads back. Spec: TBD Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
`make drill-recovery` proves the break-the-glass runbook end to end against a running dev environment: it writes a marker secret, exports recovery shards via `spike operator recover`, kills Nexus and all Keepers (losing the in-memory shards), restarts Nexus alone, feeds the shards back through `spike operator restore` over stdin, and verifies the pre-crash secret reads back. The Pilot's SPIRE entry is rotated through the recover and restore roles along the way, and a trap reverts it to superuser on every exit path. The drill retries the transient conditions it meets in practice: SVID rotation lag after entry updates (access_unauthorized) and Nexus still coming up (comms errors). Pilot output is captured with the streams merged, matching the other harness scripts, because cobra's Print family writes to stderr by default. The drill's first runs exposed the Nexus boot-order deadlock fixed in the previous commit, which is exactly the class of regression it exists to catch. TASKS.md: closes the Phase 1 recovery/restore task and both related Phase 3 items. Spec: TBD Signed-off-by: Volkan Özçelik <volkan.ozcelik@broadcom.com>
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.
No description provided.