feat: add automatic BIOS setup recovery + refactor#1931
Merged
Conversation
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
poroh
approved these changes
May 26, 2026
Contributor
poroh
left a comment
There was a problem hiding this comment.
Only nits that are nice to have.
Collaborator
|
@krish-nvidia is this the fix for #1846? If so can you add it to your commit message so we get the link properly? |
Contributor
Author
Yes it is, and I've already added it to the PR description (it also shows up in the github issue). Is there something else I have to do? |
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
poroh
approved these changes
May 27, 2026
Coco-Ben
approved these changes
May 27, 2026
kdhulipala-wq
approved these changes
May 27, 2026
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
kdhulipala-wq
approved these changes
May 27, 2026
poroh
approved these changes
May 27, 2026
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.
Description
This PR adds bounded recovery for hosts stuck in BIOS setup polling during ingestion and assigned host platform configuration.
PollingBiosSetupnow tracks a retry count; if BIOS setup remains incomplete for more than the default 15-minute threshold, the state machine entersHandleBiosJobFailure, powers the host off, resets the BMC, powers back on, and re-runsmachine_setup.Dell BIOS job failures and non-Dell stuck
PollingBiosSetuprecovery now share the same retry budget, so both paths fail consistently once automated recovery is exhausted. When that happens, the machine moves toBiosSetupFailed; that failed state can automatically resume to boot-order configuration onceis_bios_setup()reports success, allowing manual remediation by operators.The following values are configurable in nico-config under
[machine_state_controller]:max_bios_config_retries(default 3): maxHandleBiosJobFailurerecovery cycles before the host is moved toFailed.polling_bios_setup_stuck_threshold(default 15m): how longPollingBiosSetupmay sit onis_bios_setup() == falsebefore escalating into recovery.This also refactors the BIOS setup/job handling logic out of
handler.rsintocrates/api/src/state_controller/machine/handler/bios_config.rs, keeping machine setup, Dell BIOS job polling, stuck polling escalation, and failed-state recovery in one focused module.Type of Change
Related Issues (Optional)
#1846
Breaking Changes
Testing
Additional Notes