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

Add page for enabling kdump through ignition #388

Merged
merged 1 commit into from
May 6, 2022

Conversation

mike-nguyen
Copy link
Member

As a part of coreos/fedora-coreos-tracker#1147, add a page for enabling kdump through ignition.

@dustymabe
Copy link
Member

Thanks for writing this up @mike-nguyen.

It seems to me like this page has a lot of overlap with the other page. Maybe we should put the meat of the steps in this new page you've created (i.e. in the last section we show the rpm-ostree kargs that's currently documented on the other page. Then we could link to it from the other page and also maybe make the other page more about what you do with a vmcore once you have it.


[NOTE]
====
The reboot in the systemd unit is required for kdump to use the correct kernel arguments when it kexecs into the crash kernel.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The reboot in the systemd unit is required for kdump to use the correct kernel arguments when it kexecs into the crash kernel.
The reboot in the systemd unit is required for kdump to use the correct kernel arguments. When kexec runs it re-uses the kernel arguments from the current boot and this has the undesired side effect of re-running Ignition if the machine had never rebooted.

I'm thinking we either give a little more context here, or we link to an issue where this is explained a little further.

Copy link
Member

Choose a reason for hiding this comment

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

I think this note should be at the top before the Ignition config.

WantedBy=multi-user.target
----

[NOTE]
Copy link
Member

Choose a reason for hiding this comment

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

might be nice to mention somewhere in here the info from the other page about /etc/kdump.conf

@dustymabe
Copy link
Member

It seems to me like this page has a lot of overlap with the other page. Maybe we should put the meat of the steps in this new page you've created (i.e. in the last section we show the rpm-ostree kargs that's currently documented on the other page. Then we could link to it from the other page and also maybe make the other page more about what you do with a vmcore once you have it.

I guess another option is we don't create a new page and just add the "how to configure this via Ignition" to the existing page.

Copy link
Member

@travier travier left a comment

Choose a reason for hiding this comment

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

@@ -0,0 +1,51 @@
:experimental:
Copy link
Member

Choose a reason for hiding this comment

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

Not needed anymore


[NOTE]
====
The reboot in the systemd unit is required for kdump to use the correct kernel arguments when it kexecs into the crash kernel.
Copy link
Member

Choose a reason for hiding this comment

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

I think this note should be at the top before the Ignition config.

@bgilbert
Copy link
Contributor

bgilbert commented Apr 8, 2022

This is incurring two reboots during first boot. Don't we want something more like this:

variant: fcos
version: 1.4.0
kernel_arguments:
  should_exist:
  - 'crashkernel=300M'
systemd:
  units:
    - name: kdump.service
      enabled: true

coupled with a postprocess script in the fedora-coreos-config user-experience.yaml that updates KDUMP_COMMANDLINE_REMOVE in /etc/sysconfig/kdump?

@dustymabe
Copy link
Member

This is incurring two reboots during first boot. Don't we want something more like this:

variant: fcos
version: 1.4.0
kernel_arguments:
  should_exist:
  - 'crashkernel=300M'
systemd:
  units:
    - name: kdump.service
      enabled: true

coupled with a postprocess script in the fedora-coreos-config user-experience.yaml that updates KDUMP_COMMANDLINE_REMOVE in /etc/sysconfig/kdump?

I know @mike-nguyen had looked into trying to get something like this to work but I don't know if he ever quite got it. @mike-nguyen do you remember what the complications were?

@travier
Copy link
Member

travier commented Apr 12, 2022

It's #388 (comment). We can not do it first boot and need an additional reboot. The note needs to be front and center to prevent folks from falling into this trap.

@bgilbert
Copy link
Contributor

It's #388 (comment). We can not do it first boot and need an additional reboot. The note needs to be front and center to prevent folks from falling into this trap.

What's wrong with the approach in #388 (comment) though? Ignition will reboot to add the crashkernel karg, and an appropriate value for KDUMP_COMMANDLINE_REMOVE should ensure the crash kernel doesn't inherit ignition.firstboot.

@travier
Copy link
Member

travier commented Apr 13, 2022

What's wrong with the approach in #388 (comment) though? Ignition will reboot to add the crashkernel karg, and an appropriate value for KDUMP_COMMANDLINE_REMOVE should ensure the crash kernel doesn't inherit ignition.firstboot.

Whoops sorry, indeed, I had missed that.

@mike-nguyen
Copy link
Member Author

mike-nguyen commented Apr 13, 2022

It's #388 (comment). We can not do it first boot and need an additional reboot. The note needs to be front and center to prevent folks from falling into this trap.

What's wrong with the approach in #388 (comment) though? Ignition will reboot to add the crashkernel karg, and an appropriate value for KDUMP_COMMANDLINE_REMOVE should ensure the crash kernel doesn't inherit ignition.firstboot.

I know I tried adding ignition.firstboot to KDUMP_COMMANDLINE_REMOVE in /etc/kdump.conf--this was in the context of after the system already being provisioned through ignition. Its been a while and I forgot why that didn't work. I'll also try making it a part of the post process scripts and will report back.

@dustymabe
Copy link
Member

Thank you @mike-nguyen!

@dustymabe
Copy link
Member

I know I tried adding ignition.firstboot to KDUMP_COMMANDLINE_REMOVE in /etc/kdump.conf--this was in the context of after the system already being provisioned through ignition. Its been a while and I forgot why that didn't work. I'll also try making it a part of the post process scripts and will report back.

Seems to work from what I can tell: coreos/fedora-coreos-config#1708

@mike-nguyen
Copy link
Member Author

I know I tried adding ignition.firstboot to KDUMP_COMMANDLINE_REMOVE in /etc/kdump.conf--this was in the context of after the system already being provisioned through ignition. Its been a while and I forgot why that didn't work. I'll also try making it a part of the post process scripts and will report back.

Seems to work from what I can tell: coreos/fedora-coreos-config#1708

Sorry this fell off my radar. I tested your PR manually and it worked!

@mike-nguyen mike-nguyen force-pushed the kdump_page branch 3 times, most recently from 6876636 to 4619ec7 Compare May 2, 2022 21:10
@mike-nguyen
Copy link
Member Author

mike-nguyen commented May 2, 2022

Consolidated everything into the original debugging kdump page and added steps to enable via ignition. This doc is dependent on coreos/fedora-coreos-config#1708 (thanks @dustymabe!) which will remove ignition.firstboot from the kernel arguments for the crash kernel and no longer require a reboot.

Copy link
Contributor

@bgilbert bgilbert left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@mike-nguyen mike-nguyen merged commit d654c92 into coreos:main May 6, 2022
mohelt pushed a commit to mohelt/fedora-coreos-docs that referenced this pull request May 9, 2022
Disable automatic configuration on ethernet devices (DHCP/SLAAT) with no other matching connections

Update modules/ROOT/pages/sysconfig-network-configuration.adoc

Co-authored-by: Dusty Mabe <[email protected]>

Update modules/ROOT/pages/sysconfig-network-configuration.adoc

Co-authored-by: Dusty Mabe <[email protected]>

Update modules/ROOT/pages/sysconfig-network-configuration.adoc

Co-authored-by: Dusty Mabe <[email protected]>

Update modules/ROOT/pages/sysconfig-network-configuration.adoc

Co-authored-by: Dusty Mabe <[email protected]>

provisioning/exoscale: Add note/warning about CLI compression

Recommend users to use v1.54.0 and above and to never use the
`--cloud-init-compress` argument.

Closes coreos/fedora-coreos-tracker#1160

Add page for enabling kdump through ignition (coreos#388)

sysconfig-network-configuration: Improve readability and look

Improve readability and look of sysconfig-network

Final commit
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.

4 participants