Skip to content

Add hooks for deployment steps to allow bootloader swapping#3539

Open
Mstrodl wants to merge 1 commit intoostreedev:mainfrom
Mstrodl:feature/mstrodl/bootplugin
Open

Add hooks for deployment steps to allow bootloader swapping#3539
Mstrodl wants to merge 1 commit intoostreedev:mainfrom
Mstrodl:feature/mstrodl/bootplugin

Conversation

@Mstrodl
Copy link
Copy Markdown
Contributor

@Mstrodl Mstrodl commented Oct 22, 2025

Can be used to provide hooks into a sysroot deploy for tools like bootupd to perform bootloader swaps.

Happy to do this a different way, but this is how we've been doing it on our debian-based system. I understand bootupd is supposed to work a different way. We do it this way because grub-mkconfig will generate a broken config for the older version of grub.

See #3496 for motivation

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Oct 22, 2025

Hi @Mstrodl. Thanks for your PR.

I'm waiting for a github.com 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.

Details

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.

@Mstrodl Mstrodl changed the title Add support for bootloader-plugin Add hooks for deployment steps to allow bootloader swapping Oct 22, 2025
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for a bootloader-plugin by introducing hooks into the deployment process. The overall logic is sound, with hooks for deploy and swap actions placed at appropriate stages. My main feedback concerns code duplication in the plugin invocation logic, which could be refactored into a helper function for better maintainability. Additionally, the path to the plugin executable is hardcoded, and making it configurable would enhance flexibility for different system layouts.

Comment thread src/libostree/ostree-sysroot-deploy.c Outdated
@Mstrodl
Copy link
Copy Markdown
Contributor Author

Mstrodl commented Oct 22, 2025

By the way if this is not something you guys want to take, that's fine too. I just figured other people might find it useful too :)

@Mstrodl Mstrodl force-pushed the feature/mstrodl/bootplugin branch from 56b1834 to 379f414 Compare October 22, 2025 15:00
@champtar
Copy link
Copy Markdown
Collaborator

One important info from #3496 that you forgot to repeat here is that Debian version of grub doesn't support BLS (yet), so you can't use bootupd static config :(

@Mstrodl Mstrodl force-pushed the feature/mstrodl/bootplugin branch 2 times, most recently from 5fb4f8c to 9e17665 Compare April 22, 2026 21:01
Can be used to provide hooks into a sysroot deploy for tools like
bootupd to perform bootloader swaps.

Happy to do this a different way, but this is how we've been doing
it on our debian-based system. I understand bootupd is supposed to
work a different way. We do it this way because grub-mkconfig will
generate a broken config for the older version of grub.
@Mstrodl Mstrodl force-pushed the feature/mstrodl/bootplugin branch from 9e17665 to e5e4c23 Compare April 23, 2026 11:55
@Mstrodl
Copy link
Copy Markdown
Contributor Author

Mstrodl commented Apr 23, 2026

Hmm
Tests keep failing in different spots, but they look pretty unrelated. Is there some way to retry the jenkins one @cgwalters?

Also if it would be helpful I could share the source for our grub plugin. It's not perfectly atomic, but it's better than nothing :)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants