Skip to content

Conversation

@ayaegashi
Copy link
Contributor

@ayaegashi ayaegashi commented Oct 21, 2025

🔍 Description

Update the Host Configuration with the paths of sysexts and confexts at the end of Staging. Also add a couple SELinux permissions so Trident can mount sysexts and confexts.

🤔 Rationale

We need to update the Host Configuration with the paths of the sysexts and confexts in the target OS. To do so, we need the "name" of the extension image (information stored in the subsystem) and need to update the Engine Context.

📝 Checks

📌 Follow-ups

TODO:

  • Write e2e test
  • Update and update docs

🗒️ Notes

@ayaegashi ayaegashi requested a review from a team as a code owner October 21, 2025 16:11
Copilot AI review requested due to automatic review settings October 21, 2025 16:11
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 updates the Host Configuration with the paths of sysext and confext extension images after they are staged during provisioning. The changes introduce an as_any() method to all subsystems to enable downcasting, add a method to update extension paths in the Host Configuration, and integrate this update into both clean install and AB update staging flows.

Key changes:

  • Added as_any() method to all subsystem implementations to support trait object downcasting
  • Created update_host_configuration() method in ExtensionsSubsystem to populate extension paths
  • Updated staging flows to call the new method and store the updated Host Configuration

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/trident/src/engine/mod.rs Added as_any() to Subsystem trait, created helper function to retrieve ExtensionsSubsystem, and registered ExtensionsSubsystem in the lazy_static list
crates/trident/src/subsystems/extensions/mod.rs Implemented as_any() method and added update_host_configuration() to update extension paths in Host Configuration
crates/trident/src/engine/update.rs Integrated Host Configuration update with extension paths during AB update staging
crates/trident/src/engine/clean_install.rs Integrated Host Configuration update with extension paths during clean install staging
crates/trident/src/subsystems/storage/mod.rs Implemented as_any() method for StorageSubsystem
crates/trident/src/subsystems/selinux.rs Implemented as_any() method for SelinuxSubsystem
crates/trident/src/subsystems/osconfig/mod.rs Implemented as_any() method for OsConfigSubsystem and MosConfigSubsystem
crates/trident/src/subsystems/network.rs Implemented as_any() method for NetworkSubsystem
crates/trident/src/subsystems/management.rs Implemented as_any() method for ManagementSubsystem
crates/trident/src/subsystems/initrd.rs Implemented as_any() method for InitrdSubsystem
crates/trident/src/subsystems/hooks.rs Implemented as_any() method for HooksSubsystem
crates/trident/src/subsystems/esp.rs Implemented as_any() method for EspSubsystem
crates/trident/src/engine/boot/mod.rs Implemented as_any() method for BootSubsystem

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 21, 2025 16: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 13 out of 13 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 21, 2025 16: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 13 out of 13 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 22, 2025 19:48
@ayaegashi
Copy link
Contributor Author

/AzurePipelines run [GITHUB]-trident-pr-e2e

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 13 out of 13 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ayaegashi
Copy link
Contributor Author

/AzurePipelines run [GITHUB]-trident-pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ayaegashi ayaegashi marked this pull request as draft October 22, 2025 21:48
@ayaegashi
Copy link
Contributor Author

/AzurePipelines run [GITHUB]-trident-pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI review requested due to automatic review settings October 24, 2025 20:22
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 5 out of 5 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 AI review requested due to automatic review settings October 24, 2025 20: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 5 out of 5 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 AI review requested due to automatic review settings October 24, 2025 20:51
@ayaegashi
Copy link
Contributor Author

/AzurePipelines run [GITHUB]-trident-pr-e2e

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 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ayaegashi
Copy link
Contributor Author

/AzurePipelines run [GITHUB]-trident-pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

bfjelds
bfjelds previously approved these changes Oct 27, 2025
Ok(())
}

fn update_host_configuration(&self, ctx: &mut EngineContext) -> Result<(), TridentError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

does this not need to happen for install?
this function only has sysext-related code, perhaps it should be named to reflect that? also add doc comments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean? This function is called in clean_install.rs so it should be called for clean install as well.
Since this is a Subsystem method, the doc comments for it are inside crates/trident/src/engine/mod.rs

Copilot AI review requested due to automatic review settings October 27, 2025 20:15
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 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

bfjelds
bfjelds previously approved these changes Oct 27, 2025
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.

6 participants