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

Support kernel overrides in ex rebuild container flow #3364

Closed
cgwalters opened this issue Jan 27, 2022 · 5 comments
Closed

Support kernel overrides in ex rebuild container flow #3364

cgwalters opened this issue Jan 27, 2022 · 5 comments
Assignees

Comments

@cgwalters
Copy link
Member

cgwalters commented Jan 27, 2022

We want to be able to override the kernel and have that Just Work when rebasing on the client-side.

This is a follow-up to #3489.

@jlebon jlebon added the jira for syncing to jira label Feb 7, 2022
@jlebon jlebon self-assigned this Feb 7, 2022
@jlebon jlebon changed the title Support ex rebuild with overrides, particularly kernel overrides Support ex rebuild container flow with overrides, particularly kernel overrides Mar 2, 2022
@jlebon
Copy link
Member

jlebon commented Mar 2, 2022

I think we should probably split this issue into three:

  • support rpm-ostree override remove and override-remove dropins
  • support rpm-ostree override replace and override-replace dropins for !kernel
  • support rpm-ostree override replace and override-replace dropins for kernel, which is more complex

One thing though to clarify is the concept of "override" in the CoreOS layering path. If we have a pipeline consisting of multiple sequential layering black boxes, each of which modifying the package set, do later layering steps consider newly added packages as "base" or are we always comparing against the base OSTree commit?

My intuition tells me we want the former semantic because e.g. from a context where part of that pipeline is vendor-controlled and part is user-controlled, we want vendor "extensions" to be considered base packages so that users think carefully about overriding them vs just having to uninstall. It also makes implementing all this easier I think.

@jlebon jlebon changed the title Support ex rebuild container flow with overrides, particularly kernel overrides Support kernel overrides in ex rebuild container flow Mar 3, 2022
@jlebon
Copy link
Member

jlebon commented Mar 3, 2022

OK, I've split this in two:

@cgwalters
Copy link
Member Author

OK it'd be great to pick this up for Fedora 37/OCP 4.12 timeframe-ish.

Basically here's the thing - so far in the "rpm-ostree-in-container" flow we are 95% deferring to libdnf. But to implement this correctly, we must intercept /bin/kernel-install. Today, rpm-ostree compose tree handles this by running each package script in its own container (via bubblewrap) and we simply know not to execute the scripts for kernel:

// We take over depmod/dracut etc. It's `kernel` in C7 and kernel-core in F25+

But we can't rely on container-in-container stuff here. We can intercept %post scripts but that's a whole big task that involves not using the libdnf machinery for package installs. I think that'd be good long term - it would help unblock various things, including handling translation of /var/lib/foo to tmpfiles.d etc.

But short term I'd say we add kernel-install to our cliwrap.rs - we already support dracut there. Basically, what our kernel-install needs to do is just regenerate the initramfs but drop it in /usr/lib/modules/$kver/initramfs.img and not /boot. We should absolutely not run os-prober or really any grub stuff at all.

@jmarrero
Copy link
Member

Will be working on this on the following PR: #3689

@jmarrero
Copy link
Member

This is now done via #3689

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

No branches or pull requests

3 participants