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

manifest: add kexec-tools for kdump #708

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Oct 23, 2020

This was discussed in:
coreos/fedora-coreos-tracker#622

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -252,6 +255,9 @@
"elfutils-libs": {
"evra": "0.181-1.fc32.x86_64"
},
"ethtool": {
Copy link
Member Author

Choose a reason for hiding this comment

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

The only reason this appears to be needed is to handle bonding and teaming: https://src.fedoraproject.org/rpms/kexec-tools/blob/master/f/dracut-module-setup.sh#_189, which is unfortunate. I think we have code which also deals with those, so maybe we can submit a patch to drop that dep.

@@ -1026,12 +1035,18 @@
"slirp4netns": {
"evra": "1.1.4-1.fc32.x86_64"
},
"snappy": {
Copy link
Member Author

Choose a reason for hiding this comment

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

For compressing dump with snappy. Dynamically linked.

"socat": {
"evra": "1.7.3.4-2.fc32.x86_64"
},
"sqlite-libs": {
"evra": "3.33.0-2.fc32.x86_64"
},
"squashfs-tools": {
Copy link
Member Author

Choose a reason for hiding this comment

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

It uses dracut's built-in support for putting files in a squashfs.

Copy link
Member

Choose a reason for hiding this comment

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

Right but why does it do that? What's the squashfs image? I am not finding docs for this; the main hit I see so far is:

grep -ri squash /usr/lib/dracut/modules.d/99kdumpbase/
/usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh:    is_squash_available() {
/usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh:        for kmodule in squashfs overlay loop; do
/usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh:    if is_squash_available && ! is_fadump_capable; then
/usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh:        _dep="$_dep squash"
/usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh:        dwarning "Required modules to build a squashed kdump image is missing!"

but that doesn't help.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll admit I only actually looked over the dracut code for this to get a sense of why it pulls it in. What I gathered is that it puts the meat of the initramfs files in a squashfs to save space.

OK, some dist-git sleuthing led me to https://src.fedoraproject.org/rpms/kexec-tools/c/9b6e3124477212b8321392b2f365beddd7881e22?branch=master and dracutdevs/dracut@095e1f3, which more or less confirms this. The squashfs is part of the initrd, and dracut mounts it early on and things carry on transparently.

From https://src.fedoraproject.org/rpms/kexec-tools/c/4a44eee472745f8dd43b18815851bd668b7497da?branch=master though, it clearly can work fine without it. So we could try to see if the maintainers are interested in making it a weak dep. I'm not sure if I'd block inclusion into RHCOS for this though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

And of course, there's the question of whether we actually want to opt out of those RAM savings. From dracutdevs/dracut@095e1f3, it seems like not a lot, though somewhat significant in proportion to the total amount of RAM to reserve. If that PR gets merged, we can ship without it as a first cut at least.

@@ -228,6 +228,9 @@
"dracut-network": {
"evra": "050-61.git20200529.fc32.x86_64"
},
"dracut-squash": {
Copy link
Member Author

Choose a reason for hiding this comment

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

It uses dracut's built-in support for putting files in a squashfs.

@jlebon jlebon closed this Oct 26, 2020
@jlebon jlebon reopened this Oct 26, 2020
@jlebon jlebon merged commit 5cf3ebb into coreos:testing-devel Oct 26, 2020
@jlebon jlebon deleted the pr/kdump branch October 26, 2020 15:11
@jlebon
Copy link
Member Author

jlebon commented Jan 11, 2021

https://src.fedoraproject.org/rpms/kexec-tools/pull-request/4 was merged now, so in the future dracut-squash and squashfs-tools should drop out.

@liutgnu
Copy link

liutgnu commented Apr 30, 2021

Hello CoreOS team,

I have reverted the commit "Make dracut-squash a weak dep" to make
dracut-squash as Required for kexec-tools again [1].

Although kexec-tools can work without dracut-squash, but it is essential
for kdump to run properly in some cases [2]. If it's the case in CoreOS,
then dracut-squash is needed.

Besides, kdump is evolving. Currently new features [3] of kdump to enhance
vmcore security is in development. If patch were merged, minimal amount
of memory consumption is still expected for kdump, thus dracut-squash is
needed for that.

Thanks!

[1] https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/thread/MX7INNHDHXKS4JXARMSYYHVEV2HOFHID/
[2] https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/message/SJX7CW3WLOYSFI2YJKGTUGDBWSCMZXVZ/
[3] https://www.spinics.net/lists/systemd-devel/msg05864.html

@jlebon
Copy link
Member Author

jlebon commented Apr 30, 2021

@liutgnu Thanks for following up here. IIUC, this will also solve crashkernel=auto not estimating the right amount of memory to reserve.

/cc @kelvinfan001

@kelvinfan001
Copy link
Member

On our end, we'll need to update the docs to instruct users to reserve less memory for the crash kernel (auto should be fine) once kexec-tools pulls in dracut-squash again.

@liutgnu
Copy link

liutgnu commented May 8, 2021

Thanks for the updating. @jlebon @kelvinfan001

c4rt0 pushed a commit to c4rt0/fedora-coreos-config that referenced this pull request Mar 27, 2023
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.

5 participants