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

05core: skip sysroot.mount for remote kdump #2847

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

jbtrystram
Copy link
Contributor

If kdump is setup to upload logs to a remote host, the XFS module may not be loaded, which cause sysroot.mount to fail.

If the target for logs is SSH, kdump will boot with a kdump_remote_ip karg. Skip generating sysroot.mount in that case so kdump can boot without having to load XFS.

See https://issues.redhat.com/browse/OCPBUGS-27935

@dustymabe
Copy link
Member

would an alternative approach to this be to just make sure the XFS module gets loaded in the initramfs?

@jbtrystram
Copy link
Contributor Author

It's what I suggested on https://issues.redhat.com/browse/OCPBUGS-27935
But if I understand things correctly, we don't control what is shipped in kdump initramfs, as it's generated each boot, and it depends on what is in the kdump config, which may be overloaded by the users

jlebon
jlebon previously approved these changes Feb 9, 2024
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

Yeah, this is not ideal but at least it's contained.

I think the real fix here is probably a barrier release to finally migrate older systems to add a root karg, and then we'd change the logic here to only emit sysroot.mount on first boot (i.e. move it below the ignition.firstboot check).

@dustymabe
Copy link
Member

another option would be to convince kdump upstream to name the module in their default config. but if we want to do the root karg dance/migration anyway then maybe we just focus on that?

@jbtrystram
Copy link
Contributor Author

I am not so sure about I should do here , after reading comments from @dustymabe and @jlebon :)

@jlebon
Copy link
Member

jlebon commented Feb 15, 2024

IMO I think we should get this in to unbreak anyone using kdump+SSH. Doing the migration is good too, but must be done carefully.

How about filing a tracker issue for the migration and then linking that as a comment in the code mentioning that we'll be able to clean this up once it's implemented?

@jbtrystram
Copy link
Contributor Author

IMO I think we should get this in to unbreak anyone using kdump+SSH. Doing the migration is good too, but must be done carefully.

How about filing a tracker issue for the migration and then linking that as a comment in the code mentioning that we'll be able to clean this up once it's implemented?

Ok, I updated the commit message and also add a link in the code

If kdump is setup to upload logs to a remote host, the
XFS module may not be loaded, which cause sysroot.mount to fail.

If the target for logs is SSH, kdump will boot with a `kdump_remote_ip`
karg. Skip generating sysroot.mount in that case so kdump can boot
without having to load XFS.

This is a temporary fix until we migrate older systems to have a root
karg: coreos/fedora-coreos-tracker#1675

See https://issues.redhat.com/browse/OCPBUGS-27935
@jlebon jlebon merged commit 1d757f4 into coreos:testing-devel Feb 17, 2024
3 checks passed
@jbtrystram jbtrystram deleted the kdump-xfs branch February 17, 2024 13:06
@travier
Copy link
Member

travier commented Feb 21, 2024

We can not rely on loading the right filesystem module as kdump maybe be used in a "diskless" / upload to remote mode which will not touch the disks at all, for example if those are LUKS encrypted.

jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 8, 2024
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Adding this as a condition to the sysroot.mount generator makes systemd
skip the mount unit in kdump initramfs (only when kdump is configured to
export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-27935
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 8, 2024
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Adding this as a condition to the sysroot.mount generator makes systemd
skip the mount unit in kdump initramfs (only when kdump is configured to
export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 11, 2024
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 11, 2024
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 12, 2024
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 12, 2024
Further refines 1d757f4
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 12, 2024
Further refines 1d757f4
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit that referenced this pull request Mar 12, 2024
Further refines 1d757f4
See #2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 13, 2024
Further refines 1d757f4
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit that referenced this pull request Mar 13, 2024
Further refines 1d757f4
See #2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Mar 13, 2024
Further refines 1d757f4
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
jbtrystram added a commit that referenced this pull request Mar 13, 2024
Further refines 1d757f4
See #2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
aaradhak pushed a commit to aaradhak/fedora-coreos-config that referenced this pull request Mar 18, 2024
Further refines 1d757f4
See coreos#2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Use the dracut lib to query the "kdump_remote_ip" argument to skip the sysroot
mount unit in kdump initramfs
(only when kdump is configured to export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
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.

None yet

4 participants