Skip to content

Conversation

@bfjelds
Copy link
Member

@bfjelds bfjelds commented Oct 6, 2025

🔍 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).

@bfjelds bfjelds changed the title POC: uefi-fallback implementation DNM: DRAFT: POC: uefi-fallback implementation Oct 6, 2025
@bfjelds bfjelds changed the title DNM: DRAFT: POC: uefi-fallback implementation feature: uefi-fallback implementation Oct 24, 2025
@bfjelds bfjelds marked this pull request as ready for review October 24, 2025 22:30
@bfjelds bfjelds requested a review from a team as a code owner October 24, 2025 22:30
@Copilot Copilot AI review requested due to automatic review settings October 24, 2025 22:30
Copy link
Contributor

Copilot AI left a 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 UefiFallbackMode enum with three variants: Rollback, Rollforward, and None
  • 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.

@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 00:32
Copy link
Contributor

Copilot AI left a 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.

@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 00:42
Copy link
Contributor

Copilot AI left a 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.

@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 01:34
Copy link
Contributor

Copilot AI left a 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.

@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 01:45
Copy link
Contributor

Copilot AI left a 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.

@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 01:49
Copy link
Contributor

Copilot AI left a 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.

@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 02:01
Copy link
Contributor

Copilot AI left a 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.

@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 02:23
Copy link
Contributor

Copilot AI left a 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.

@Copilot Copilot AI review requested due to automatic review settings October 25, 2025 02:49
@bfjelds bfjelds force-pushed the user/bfjelds/poc-fallback-uefi-boot branch from 4d00311 to edf1ebc Compare October 25, 2025 02:49
Copy link
Contributor

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant