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

Rewrite loader linux/initrd entry relabelling without regex to improve reliability #2388

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

KaliumPuceon
Copy link
Contributor

@KaliumPuceon KaliumPuceon commented Oct 30, 2023

Replacing the regex-based loader entry fix with string parsing.

A user building RHEL images ran into issues with the initrd. It turns out that RHEL uses some patches that mean the initrd/linux files in RHEL are not installed to /boot, which trips up the original regex. The new fix doesn't rely on matching the path in boot, instead just finding the initrd/linux files and rewriting them in place.

This change also adds the pre-and-post fix loader entries to the debug logs.

Original bug report https://bugzilla.suse.com/show_bug.cgi?id=1208701

Fixes suse bsc#1208701

Changes proposed in this pull request:

  • Replace loader fix regex with python string handling.

@schaefi
Copy link
Collaborator

schaefi commented Oct 30, 2023

Thanks for the work done here. As discussed internally on slack I appreciate the change. I'll do some tests. Could you please fix the white space issues reported by the linters ? Thanks much

@davidcassany if you can take a look at the changes would be great. I'm on vacation this week and will take a look when I'm back

@schaefi
Copy link
Collaborator

schaefi commented Nov 4, 2023

@davidcassany can you also take a look on the proposed changes ? Thanks much

@schaefi schaefi self-requested a review November 4, 2023 14:43
Copy link
Collaborator

@schaefi schaefi left a comment

Choose a reason for hiding this comment

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

Given the last nit pick change got addressed, this looks good to me. Thanks for your effort

Copy link
Member

@Conan-Kudo Conan-Kudo left a comment

Choose a reason for hiding this comment

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

Please squash all this into a single commit.

@Conan-Kudo
Copy link
Member

Conan-Kudo commented Nov 10, 2023

@KaliumPuceon Can you put your pull request description in the commit message? Here's a suggested version:

Replace the regex-based loader entry fix with string parsing

A user building RHEL images ran into issues with the initrd. 
It turns out that RHEL uses some patches that mean the
initrd/linux files in RHEL are not installed to /boot, which trips
up the original regex. The new fix doesn't rely on matching the
path in boot, instead just finding the initrd/linux files and rewriting
them in place.

This change also adds the pre-and-post fix loader entries to the debug logs.

Reference: https://bugzilla.suse.com/1208701

Fixes suse bsc#1208701

@Conan-Kudo Conan-Kudo merged commit 24fe960 into OSInside:master Nov 10, 2023
10 checks passed
@Conan-Kudo
Copy link
Member

I just took care of it via squash merge.

@schaefi
Copy link
Collaborator

schaefi commented Nov 10, 2023

ok, this change now needs good testing through the integration test matrix. As it will be visible at boot time I would wish we can just trigger the build tests done by @dcermak somehow ? But I think we need Dan to do it. I will update kiwi in Staging today so that the integration tests rebuild

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.

3 participants