-
Notifications
You must be signed in to change notification settings - Fork 67
Wait on Dell BIOS config task IDs in machine setup #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1678,6 +1678,10 @@ pub enum MachineState { | |
| Init, | ||
| EnableIpmiOverLan, | ||
| WaitingForPlatformConfiguration, | ||
| /// Wait for BIOS config job (Dell) to complete before PollingBiosSetup / SetBootOrder. | ||
| WaitingForBiosJob { | ||
| bios_config_info: BiosConfigInfo, | ||
| }, | ||
| PollingBiosSetup, | ||
| SetBootOrder { | ||
| set_boot_order_info: Option<SetBootOrderInfo>, | ||
|
|
@@ -1729,6 +1733,29 @@ pub enum UefiSetupState { | |
| LockdownHost, | ||
| } | ||
|
|
||
| /// Tracks progress waiting for the Dell BIOS config job (from machine_setup PATCH) to complete | ||
| /// before configuring boot order. Same pattern as SetBootOrderInfo / SetBootOrderState. | ||
| #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] | ||
| #[serde(rename_all = "lowercase")] | ||
| pub struct BiosConfigInfo { | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub bios_job_id: Option<String>, | ||
| pub bios_config_state: BiosConfigState, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq, EnumIter)] | ||
| #[serde(tag = "state", rename_all = "lowercase")] | ||
| pub enum BiosConfigState { | ||
| WaitForBiosJobScheduled, | ||
| RebootHost, | ||
| WaitForBiosJobCompletion, | ||
| /// Power off → BMC reset → power on when job fails or is scheduled with errors (same as boot order). | ||
| HandleBiosJobFailure { | ||
| failure: String, | ||
| power_state: PowerState, | ||
| }, | ||
| } | ||
|
Comment on lines
+1748
to
+1757
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Then one shared handler that replaces both |
||
|
|
||
| #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] | ||
| #[serde(rename_all = "lowercase")] | ||
| pub struct SetBootOrderInfo { | ||
|
|
@@ -1892,7 +1919,11 @@ pub enum HostPlatformConfigurationState { | |
| }, | ||
| CheckHostConfig, | ||
| UnlockHost, | ||
| ConfigureBios, | ||
| /// When bios_config_info is Some, we are waiting for the BIOS job to complete (Dell). | ||
| ConfigureBios { | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| bios_config_info: Option<BiosConfigInfo>, | ||
| }, | ||
| PollingBiosSetup, | ||
| SetBootOrder { | ||
| set_boot_order_info: SetBootOrderInfo, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add
retry_counthere and check against it in the state transitions or else we could infinite loop if the job keeps failing, even with the remediation. I think the boot order states already do this.