-
Notifications
You must be signed in to change notification settings - Fork 5
feature: uefi-fallback implementation #245
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?
Conversation
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.
Pull Request Overview
This PR implements UEFI fallback functionality to handle UEFI variable corruption during OS installation and updates. The feature enables the system to either rollback to the servicing OS or rollforward to the target OS by copying EFI boot files and grub.cfg to the Linux UEFI fallback path.
Key changes:
- Added
UefiFallbackModeenum with three variants:Rollback,Rollforward, andNone - Implemented
configure_uefi_fallback()function to copy boot files based on the configured mode - Added comprehensive E2E tests and configuration files for validating the fallback behavior
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
crates/trident_api/src/config/host/os/mod.rs |
Defines the UefiFallbackMode enum and adds uefi_fallback field to the Os struct |
crates/trident/src/subsystems/esp.rs |
Implements UEFI fallback logic with configure_uefi_fallback() and simple_copy_boot_files() functions |
tests/e2e_tests/uefi_fallback_test.py |
Adds E2E test to verify active volume remains unchanged after UEFI fallback |
tests/e2e_tests/trident_configurations/uefifallback/trident-config.yaml |
Provides test configuration that simulates UEFI corruption via systemd service |
docs/Reference/Host-Configuration/API-Reference/UefiFallbackMode.md |
Documents the new UEFI fallback mode API |
tools/storm/helpers/ab_update.go |
Adds SkipServiceCheck flag to conditionally skip service checks after A/B updates |
.pipelines/templates/stages/testing_common/e2e-test-run.yml |
Updates CI pipeline to handle uefifallback test scenario with special handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/e2e_tests/trident_configurations/usr-verity/trident-config.yaml
Outdated
Show resolved
Hide resolved
tests/e2e_tests/trident_configurations/simple/trident-config.yaml
Outdated
Show resolved
Hide resolved
tests/e2e_tests/trident_configurations/base/trident-config.yaml
Outdated
Show resolved
Hide resolved
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.
Pull Request Overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
crates/trident/src/subsystems/esp.rs:1
- The string comparison includes a leading space before 'Active:' which makes the check fragile. Consider using strings.Contains with 'Active: failed (Result: exit-code)' without the leading space, or use a more robust parsing approach.
use std::{
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
4d00311 to
edf1ebc
Compare
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.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔍 Description
Implementing fallback for uefi variable corruption.
During install and update, efi and grub.cfg are optionally copied to the linux UEFI fallback path to either rollback (for update only: to the servicing OS) or rollforward (to the target OS).