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

kernel-install: integration #5135

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jmarrero
Copy link
Member

@jmarrero jmarrero commented Oct 22, 2024

incorporates #5097
closes: #4726

This will pair with: https://gitlab.com/fedora/bootc/base-images/-/merge_requests/62 which makes the integration work.

This builds and works on the following Containerfile.

Need to figure out how to properly deal with the commented out code still.

FROM $image
RUN curl -O -L -k https://kojipkgs.fedoraproject.org//packages/kernel/6.12.0/0.rc1.20241005git27cc6fdf7201.22.fc42/x86_64/kernel-6.12.0-0.rc1.20241005git27cc6fdf7201.22.fc42.x86_64.rpm && \
 curl -O -L -k https://kojipkgs.fedoraproject.org//packages/kernel/6.12.0/0.rc1.20241005git27cc6fdf7201.22.fc42/x86_64/kernel-core-6.12.0-0.rc1.20241005git27cc6fdf7201.22.fc42.x86_64.rpm && \
 curl -O -L -k https://kojipkgs.fedoraproject.org//packages/kernel/6.12.0/0.rc1.20241005git27cc6fdf7201.22.fc42/x86_64/kernel-modules-6.12.0-0.rc1.20241005git27cc6fdf7201.22.fc42.x86_64.rpm && \
 curl -O -L -k https://kojipkgs.fedoraproject.org//packages/kernel/6.12.0/0.rc1.20241005git27cc6fdf7201.22.fc42/x86_64/kernel-modules-core-6.12.0-0.rc1.20241005git27cc6fdf7201.22.fc42.x86_64.rpm && \
 curl -O -L -k https://kojipkgs.fedoraproject.org//packages/kernel/6.12.0/0.rc1.20241005git27cc6fdf7201.22.fc42/x86_64/kernel-modules-extra-6.12.0-0.rc1.20241005git27cc6fdf7201.22.fc42.x86_64.rpm

ADD target/debug/rpm-ostree /usr/bin/rpm-ostree
RUN dnf install -y /kernel*

Copy link

openshift-ci bot commented Oct 22, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@jmarrero jmarrero changed the title Override replace kernel kernel-install: integration Oct 22, 2024
Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

rust/src/kernel_install.rs Outdated Show resolved Hide resolved
rust/src/kernel_install.rs Outdated Show resolved Hide resolved
rust/src/kernel_install.rs Outdated Show resolved Hide resolved
rust/src/kernel_install.rs Outdated Show resolved Hide resolved
rust/src/kernel_install.rs Outdated Show resolved Hide resolved
rust/src/main.rs Outdated Show resolved Hide resolved
rust/src/core.rs Outdated Show resolved Hide resolved
rust/src/core.rs Outdated Show resolved Hide resolved
@jmarrero jmarrero force-pushed the override-replace-kernel branch 2 times, most recently from 74d2f7e to 04dcac2 Compare October 25, 2024 12:57
@jmarrero
Copy link
Member Author

todo here:

  • make sure fips works
  • make sure that layering on a booted environment still works

@cgwalters
Copy link
Member

Joseph and I were looking at #4950 - I'd forgotten about that change when looking at this one.

This is all quite messy because we need to handle 2 different cases with the updated rpm-ostree (i.e. after this PR).

  • Existing base images (e.g. fcos, fedora-bootc) without the change to add integration with kernel-install; rpm-ostree override replace kernel* must continue to work
  • Base images that do have it enabled (and it's only in this case that dnf upgrade kernel will work, what we're trying to fix here)

In the first case, we must just go into our existing kernel handling and not assume the real kernel-install works. In the second, we could do two different things:

  • Detect that the base image has layout=ostree and don't wrap kernel-install
  • Or just use our own integration

I would lean to unconditionally doing the first...we shouldn't try to have it two different ways in the second. Basically let's test stuff well, and then pull the trigger on the base image side and always go through the real kernel-install.

cgwalters and others added 2 commits December 10, 2024 15:42
We also correctly parse the arguments passed on kernel-install.
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.

Integrate with kernel-install.d
2 participants