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

dd_extract: Add support for compressed kernel modules #5041

Merged
merged 6 commits into from Aug 22, 2023

Conversation

pjgeorg
Copy link
Contributor

@pjgeorg pjgeorg commented Aug 13, 2023

This PR adds support for handling compressed kernel modules to dd_extract. In particular for *.ko.gz, *.ko.xz, *.ko.bz2, *.ko.zst (these seem to be the common file extensions also supported by rpm macros). It has been opened against master to ensure the feature will be available in rhel-10 (it is of low interest for Fedora), but I plan to later also open PR against rhel-9 (and maybe rhel-8?).

I have not been able to run the full test suite locally, but instead tested dd_extract manually. I do hope the tests may be run as part of this PR.

Note that I only extended the dd_extract tests to verify it is working for xz compressed kernel modules. Shall I add cases for the other 3 file extensions as well?

Please let me know if anything seems wrong or if I forgot anything you need, first time contributing to anaconda.

@github-actions github-actions bot added the f39 label Aug 13, 2023
Copy link
Contributor

@VladimirSlavik VladimirSlavik left a comment

Choose a reason for hiding this comment

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

Thank you!

I assume you tested this - does this allow actually loading compressed modules? I'm not sure how many pieces are in place to actually use them, if they now work, that's fantastic.

It would be good to perhaps also update the docs:

  • A release note would be great. See docs/release-notes/template.rst.
  • Maybe take a look at dracut/README-driver-updates.md and docs/driverdisc.rst if there is anything to change? I don't think so, but I could be wrong.

tests/unit_tests/dd_tests/test_dd.py Outdated Show resolved Hide resolved
tests/unit_tests/dd_tests/test_dd.py Show resolved Hide resolved
@VladimirSlavik
Copy link
Contributor

PS: Testing farm is broken, disregard that status.

@VladimirSlavik
Copy link
Contributor

/kickstart-test --testtype smoke

@VladimirSlavik VladimirSlavik self-assigned this Aug 14, 2023
@VladimirSlavik
Copy link
Contributor

/kickstart-test --testtype driverdisk

@VladimirSlavik
Copy link
Contributor

One more thought, @pjgeorg you reference a RHEL bug in the commits. Do you want us to port this change there? I can't guarantee this will happen, RHEL 8 is in late lifecycle phase. But having this upstream shifts it towards possible at least.

Note to self/team - I assume we would want to extend the driverdisk kickstart tests to include also this, check write_kmod_rpm in lib/mkdud.py

@pjgeorg
Copy link
Contributor Author

pjgeorg commented Aug 16, 2023

I assume you tested this - does this allow actually loading compressed modules? I'm not sure how many pieces are in place to actually use them, if they now work, that's fantastic.

I have not been able to do a full test yet. Hence there might be other missing pieces. While I'm quite used to working with RPMs by now, creating .iso files is something I have never done so far. I'll look into it to be able to do a full test.
Adding support to dd_extract was the most obvious missing piece. By looking at the code I have not been able to identify any other obvious missing piece in Anaconda.

It would be good to perhaps also update the docs:

  • A release note would be great. See docs/release-notes/template.rst.
  • Maybe take a look at dracut/README-driver-updates.md and docs/driverdisc.rst if there is anything to change? I don't think so, but I could be wrong.

I'll check the docs and add appropriate changes to this PR.

One more thought, @pjgeorg you reference a RHEL bug in the commits. Do you want us to port this change there? I can't guarantee this will happen, RHEL 8 is in late lifecycle phase. But having this upstream shifts it towards possible at least.

My main interest is in RHEL/CentOS. So, yes, I'd like to see required changes be ported once it has been merged into master. If not for RHEL 8 than maybe at least for RHEL 9. As noted in my initial message I'm happy to open necessary PRs and do the porting myself once we are there.

@VladimirSlavik
Copy link
Contributor

/boot-iso

@github-actions
Copy link

boot.iso built successfully based on commit 3960c93. Download it from the bottom of the job status page.

@VladimirSlavik
Copy link
Contributor

Re RHELs, I discussed the timing with our team lead @jkonecny12 and we realized there's practically no way to get this into RHEL 8. We're too far into the 8.9 preparations to get it in, especially if it's only part of the solution. Then, 8.10 will be heavily focused on stability, because there will be no opportunity to fix anything - that's the last release and media is not rebuilt unless the sky is falling, so effectively installer does not get z-stream. Sorry. Still fine for RHEL 9 though.

@VladimirSlavik
Copy link
Contributor

I found #4191 which is definitely related, so perhaps it should work now?

@pjgeorg
Copy link
Contributor Author

pjgeorg commented Aug 16, 2023

Re RHELs, I discussed the timing with our team lead @jkonecny12 and we realized there's practically no way to get this into RHEL 8. We're too far into the 8.9 preparations to get it in, especially if it's only part of the solution. Then, 8.10 will be heavily focused on stability, because there will be no opportunity to fix anything - that's the last release and media is not rebuilt unless the sky is falling, so effectively installer does not get z-stream. Sorry. Still fine for RHEL 9 though.

That seems reasonable. It'd be great if we could get this into RHEL 9.

I found #4191 which is definitely related, so perhaps it should work now?

I'm not sure #4191 is related. Anyway, thanks to the boot.iso you triggered to be created I have been able to verify that it is indeed working now by using that boot.iso. I only used a simple Driver Disc with a single compressed kernel module but that should be sufficient.

@pjgeorg
Copy link
Contributor Author

pjgeorg commented Aug 16, 2023

I updated the PR:

  • adding a test for the 7 letter case
  • updated all docs mentioning .ko only so far
  • added release notes.

Hopefully this addresses all open issues. In case I shall change anything or anything is missing, please let me know.

@VladimirSlavik
Copy link
Contributor

/kickstart-test --testtype smoke

@VladimirSlavik
Copy link
Contributor

/kickstart-test --testtype driverdisk

@VladimirSlavik
Copy link
Contributor

/packit test

@VladimirSlavik
Copy link
Contributor

Thank you! I have to say this was a "perfect contribution" - code, tests, docs, everything.

I'll leave it for a while still so that other team members get the opportunity to comment, but IMO it's ready to merge as is.

If you have anything to say about how this went, I'm all ears.

@VladimirSlavik VladimirSlavik added the release note required Write a release note for this change. label Aug 22, 2023
@VladimirSlavik VladimirSlavik merged commit 0535d6b into rhinstaller:master Aug 22, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f39 release note required Write a release note for this change.
2 participants