Make reset_devices parameter default for kdump and decouple kdump systemd service from the KDUMP_CMDLINE_APPEND

Bug #1800566 reported by Guilherme G. Piccoli on 2018-10-29
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
makedumpfile (Ubuntu)
Status tracked in Eoan
Trusty
High
Guilherme G. Piccoli
Xenial
High
Guilherme G. Piccoli
Bionic
High
Guilherme G. Piccoli
Cosmic
High
Guilherme G. Piccoli
Disco
High
Guilherme G. Piccoli
Eoan
High
Guilherme G. Piccoli

Bug Description

[Impact]

* Kdump does not configure by default the crash kernel to perform a device reset by default, by passing the "reset_devices" parameter. Also, the systemd service "kdump-tools-dump" is tightly-coupled with KDUMP_CMDLINE_APPEND and it shouldn't, to prevent user confusion.

* Kernel has the "reset_devices" parameter that drivers can opt-in, and perform special activity in case this parameter is parsed from command-line. For example, in kdump kernels it hints the drivers that they are booting from a non-healthy condition and needs to issue some form of reset to the adapter, like clearing DMA mapping in their firmware for example. Users currently (kernel v5.2) are: aacraid, hpsa, ipr, megaraid_sas, mpt3sas, smartpqi, xenbus.

This should be enabled by default in the kdump config file to be added in the kdump kernel command-line for all versions.

* The systemd service"kdump-tools-dump" is responsible for triggering the execution of the makedumpfile tool ultimately. Kdump from Xenial+ releases rely on systemd as their init system, so this service is the way to trigger the kdump mechanism. Currently it is configured as any other parameter in KDUMP_CMDLINE_APPEND, meaning if user decides to change the line they need to remember adding the systemd service back. It's not really a parameter that should be easily manipulated in kdump line, since there's no use for it except to instruct systemd to load kdump; the only
reasonable case for removing it is to debug kdump itself.

[Test Case]

1) Deploy a Disco VM e.g. with uvt-kvm
2) Install the kdump-tools package
3) Run `kdump-config test`and check for the 'reset_devices' parameter:

$ kdump-config test
...
kexec command to be used:
  /sbin/kexec -p --command-line="BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0 nr_cpus=1 systemd.unit=kdump-tools.service irqpoll nousb ata_piix.prefer_ms_hyperv=0" /var/lib/kdump/vmlinuz

Also, by changing the KDUMP_CMDLINE_APPEND we can see "systemd.unit=kdump-tools.service" to be removed.

[Regression Potential]

The regression potential is low, since it doesn't need any changes in makedumpfile code and we're only adding a parameter on the crash kernel command-line. The risks are related with bad behavior with the kernel when using "reset_devices", like if the driver has bugs in this path. It's considered safer to have the option (and this way prevent problems for booting a unhealthy kernel with potential stuck DMAs in the devices) than not having it.

Regarding the other change, about the systemd service, it'll only affect users the are debugging kdump itself and it has no known regression potential.

Changed in makedumpfile (Ubuntu Cosmic):
importance: Undecided → High
Changed in makedumpfile (Ubuntu Bionic):
importance: Undecided → High
Changed in makedumpfile (Ubuntu Xenial):
importance: Undecided → High
Changed in makedumpfile (Ubuntu Trusty):
importance: Undecided → High
assignee: nobody → Guilherme G. Piccoli (gpiccoli)
Changed in makedumpfile (Ubuntu Trusty):
assignee: Guilherme G. Piccoli (gpiccoli) → Heitor R. Alves de Siqueira (halves)
Changed in makedumpfile (Ubuntu Xenial):
assignee: nobody → Heitor R. Alves de Siqueira (halves)
Changed in makedumpfile (Ubuntu Bionic):
assignee: nobody → Heitor R. Alves de Siqueira (halves)
Changed in makedumpfile (Ubuntu Cosmic):
assignee: nobody → Heitor R. Alves de Siqueira (halves)
Changed in makedumpfile (Ubuntu Disco):
assignee: Mauricio Faria de Oliveira (mfo) → Heitor R. Alves de Siqueira (halves)
Changed in makedumpfile (Ubuntu Cosmic):
status: New → Confirmed
Changed in makedumpfile (Ubuntu Bionic):
status: New → Confirmed
Changed in makedumpfile (Ubuntu Xenial):
status: New → Confirmed
Changed in makedumpfile (Ubuntu Trusty):
status: New → Confirmed
description: updated

Debdiffs for this bug were attached to LP#1800562

description: updated
tags: removed: sts
tags: added: seg
Changed in makedumpfile (Ubuntu):
assignee: Heitor Alves de Siqueira (halves) → Guilherme G. Piccoli (gpiccoli)
Changed in makedumpfile (Ubuntu Xenial):
assignee: Heitor Alves de Siqueira (halves) → Guilherme G. Piccoli (gpiccoli)
Changed in makedumpfile (Ubuntu Bionic):
assignee: Heitor Alves de Siqueira (halves) → Guilherme G. Piccoli (gpiccoli)
Changed in makedumpfile (Ubuntu Disco):
assignee: Heitor Alves de Siqueira (halves) → Guilherme G. Piccoli (gpiccoli)
Changed in makedumpfile (Ubuntu Trusty):
status: Confirmed → Won't Fix
Changed in makedumpfile (Ubuntu Cosmic):
assignee: Heitor Alves de Siqueira (halves) → Guilherme G. Piccoli (gpiccoli)
Changed in makedumpfile (Ubuntu Trusty):
assignee: Heitor Alves de Siqueira (halves) → Guilherme G. Piccoli (gpiccoli)
summary: - Make the reset_devices parameter default for kdump kernels
+ Make reset_devices parameter default for kdump and decouple kdump
+ systemd service from the KDUMP_CMDLINE_APPEND
description: updated
Guilherme G. Piccoli (gpiccoli) wrote :

This is the debdiff with this LP's proposed modifications.
I'd like to specially thanks Cascardo and Heitor for the discussions and joint work in this issue.

Changed in makedumpfile (Ubuntu Eoan):
status: Confirmed → In Progress

The attachment "lp1800566_eoan.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Changed in makedumpfile (Ubuntu Cosmic):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers