Skip to content
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

✨ Prevent BMH from transitioning when an invalid BIOS setting is detected #1889

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tliu2021
Copy link
Contributor

What this PR does / why we need it:
Currently, the installation process ignores invalid BIOS settings, which can result in a system booting without the desired configuration. This commit ensures that the process halts when an invalid BIOS setting is detected, allowing the user to correct the issue before proceeding, thereby preventing unintended configurations.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

This update ensures that the BMH (Bare Metal Host) does not transition
to the next state when an invalid BIOS setting is detected. This pause
allows the user to correct the settings before proceeding with the
installation. Additionally, a new error type has been added to
specifically handle user configuration errors.

Signed-off-by: Tao Liu <[email protected]>
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dtantsur for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 14, 2024
@metal3-io-bot
Copy link
Contributor

Hi @tliu2021. Thanks for your PR.

I'm waiting for a metal3-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 14, 2024
@tuminoid
Copy link
Member

/ok-to-test

@metal3-io-bot metal3-io-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 15, 2024
@tuminoid
Copy link
Member

/cc @dtantsur @elfosardo @iurygregory

switch {
case errors.As(err, &ConfigurationError{}):
// wait for the user to correct the error
return actionContinue{configurationErrRetryDelay}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it different from what we had before? You're only changing the retry delay for 1 to 1.5 minutes. Did you intend to you something else than actionContinue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the operation did not return an error, and there was no retry delay (see line 1892 below).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think on line 1132 the error would be returned in any case.

@tliu2021
Copy link
Contributor Author

/hold

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 21, 2024
@tliu2021
Copy link
Contributor Author

This behavior needs to be triggered based on a label in the HFS or BMH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants