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

efivar bug #2089

Merged
merged 2 commits into from
May 23, 2024
Merged

efivar bug #2089

merged 2 commits into from
May 23, 2024

Conversation

frelon
Copy link
Contributor

@frelon frelon commented May 22, 2024

  • Do not return error for efi.ReadLoadOption
  • Refactor and test efi manager

@frelon frelon requested a review from a team as a code owner May 22, 2024 08:51
@frelon frelon linked an issue May 22, 2024 that may be closed by this pull request
frelon added 2 commits May 22, 2024 13:14
When encountering a boot-entry for a device-path that go-efilib is
unable to parse we should just skip that entry instead of erroring out.

This same behavior is used earlier in the same loop so this should fix
an edge-case where the boot entry is parseable but the device-path is
not.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
This commit refactors the efi mocks out of pkg/efi/types.go and adds a
ReadLoadOptions method the the efivars interface.

We also add some tests for creating a new BootManager and verify that
the ReadLoadOptions error does not bubble up from NewBootManager method.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Copy link
Contributor

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

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

Looks good to me,
Just wondering about which use case is this actually fixing.

pkg/bootloader/grub.go Show resolved Hide resolved
pkg/efi/manager.go Show resolved Hide resolved
@davidcassany davidcassany added the kind/bug Something isn't working label May 22, 2024
@frelon frelon merged commit 48d6ca4 into rancher:main May 23, 2024
17 checks passed
@frelon frelon deleted the efivar-bug branch May 23, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bootloader install fails upon unrecognized efi boot entries
2 participants