-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add support for new crashkernel.conf
file in kernel package
#2894
Comments
Thanks for filing this!
Yeah, rpm-ostree wants to own the dracut invocation to make it part of the transaction. ostree owns the kernel/initramfs. We can add new special casing for this somewhere in the stack, or...
Note it's not just CoreOS that uses rpm-ostree, so does e.g. RHEL for Edge.
I only partially follow this, but it sounds like it boils down to:
Right? I think only 2) needs to differ for rpm-ostree, it needs to be Or is there more to it? |
Note also that as a general rule, anything you do in an e.g. |
IIUC, I think the issue there is that it would be out-of-step with the update. So e.g. you would update to a new OSTree which ships a new Depending on how tight the tolerances are and how often the values are actually expected to change, that may not be too big an issue. If we really want, we could also have glue code in early initramfs which detects this and edits the bootloader config and immediately reboots, like Ignition kargs. This is related to ostreedev/ostree#479. Another approach (though it would require more kernel modifications) would be to split the karg into two: one for the memory sizes/ranges (e.g. |
Thank you for looking into this!
That's very helpful info, we have only tested this new idea on RHEL/Fedora, so far it worked pretty well.
Yes, for 2), kexec-tools, it doesn't support ostree yet but should be simple to just call Using a service, as @jlebon said, will have to make user reboot at least twice after kernel update to get the crashkernel value right. And besides, it actually makes update the crashkernel value more difficult, since if it doesn't happen at kernel installation, kexec-tools couldn't know what crashkernel value the previous kernel is using. It only update crashkernel value if previous kernel is also using default value. This Breaking the crashkernel cmdlint into two will look really wired from the kernel side, I think upstream is not going to like it, but we can append another crashkernel=0 to override it, or release the memory after boot finished (just |
Hi, currently a new
crashkernel.conf
file is being proposed to be added to Fedora/RHEL kernel package:https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1171
This is a replacement of
crashkernel=auto
which was an RHEL-only kernel feature, it was added after a long discussion in upstream:https://lore.kernel.org/linux-mm/20210507010432.IN24PudKT%[email protected]/
The idea is simply, each kernel package will install a extra config file:
/usr/lib/modules/<kver>/crashkernel.conf
It contains the recommended default crashkernel value of that kernel.
Other packages can use that file to config kernel, like kexec-tools:
https://lists.fedoraproject.org/archives/list/[email protected]/thread/MKUSELX3GKKXPFNLEGJMWXSS2LADRPMQ/
kexec-tools will introduce a new command
kdumpctl reset-crashkernel
and will install a kernel install hook.The new command is a helper to read from that file and reset kernel's command param to the default value.
The kernel install hook will update new installed kernel's crashkernel argument to new
crashkernel.conf
's value, if current kernel is also using default value from itscrashkernel.conf
. If user is using a different value, it won't touch the value then.The problem with rpm-ostree is that, it skips all kernel hooks. So I'm not sure how should we handle this for CoreOS.
The worst impact is
crashkernel=
simply used the default value, but not being updated automatically when kernel updated, this may result in OOM in kdump kernel if new kernel require more crashkernel value to work.The text was updated successfully, but these errors were encountered: