Unnamed repository
Go to file
Coiby Xu 0adb0f4a8c try to reset kernel crashkernel when kexec-tools updates the default crashkernel value
kexec-tools could update the default crashkernel value.
When auto_reset_crashkernel=yes, reset kernel to new crashkernel
value in the following two cases,
 - crashkernel=auto is found in the kernel cmdline
 - the kernel crashkernel was previously set by kexec-tools i.e.
   the kernel is using old default crashkernel value

To tell if the user is using a custom value for the kernel crashkernel
or not, we assume the user would never use the default crashkernel value
as custom value. When kexec-tools gets updated,
 1. save the default crashkernel value of the older package to
    /tmp/crashkernel (for POWER system, /tmp/crashkernel_fadump is saved
    as well).
 2. If auto_reset_crashkernel=yes, iterate all installed kernels.
    For each kernel, compare its crashkernel value with the old
    default crashkernel and reset it if yes

The implementation makes use of two RPM scriptlets [2],
 - %pre is run before a package is installed so we can use it to save
   old default crashkernel value
 - %post is run after a package installed so we can use it to try to reset
   kernel crashkernel

There are several problems when running kdumpctl in the RPM scripts
for CoreOS/Atomic/Silverblue, for example, the lock can't be acquired by
kdumpctl, "rpm-ostree kargs" can't be run and etc.. So don't enable this
feature for CoreOS/Atomic/Silverblue.

Note latest shellcheck (0.8.0) gives false positives about the
associative array as of this commit. And Fedora's shellcheck is 0.7.2
and can't even correctly parse the shell code because of the associative
array.

[1] https://github.com/koalaman/shellcheck/issues/2399
[2] https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/

Reviewed-by: Pingfan Liu <piliu@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
2022-01-05 09:40:24 +08:00
tests selftest: kill VM reliably by recursively kill children processes 2021-10-15 19:20:25 +08:00
.editorconfig kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib 2021-09-14 03:25:46 +08:00
.gitignore .gitignore: Update to make it more generic 2016-05-16 10:15:01 +08:00
60-kdump.install Write to `/var/lib/kdump` if $KDUMP_BOOTDIR not writable 2021-04-19 16:11:17 +08:00
92-crashkernel.install 92-crashkernel.install: fix exit code 2021-09-16 23:44:13 +08:00
98-kexec.rules Make udev reload rules quiet during bootup 2018-12-06 17:44:03 +08:00
98-kexec.rules.ppc64 Stop reloading kdump service on CPU hotplug event for FADump 2021-03-10 16:24:42 +08:00
README README: Add a README file 2014-04-02 10:45:36 +08:00
crashkernel-howto.txt Update crashkernel-howto.txt 2021-07-21 14:05:42 +08:00
dracut-early-kdump-module-setup.sh dracut-early-kdump-module-setup.sh: install xargs and kdump-lib-initramfs.sh 2021-12-27 09:16:19 +08:00
dracut-early-kdump.sh dracut-early-kdump.sh: make it POSIX compatible 2021-09-15 23:11:37 +08:00
dracut-fadump-init-fadump.sh fadump-init: clean up mount points properly 2021-06-30 17:28:45 +08:00
dracut-fadump-module-setup.sh fadump: isolate fadump initramfs image within the default one 2021-06-29 21:35:58 +08:00
dracut-kdump-capture.service dracut-kdump-capture.service: Use OnFailureJobMode instead of deprecated OnFailureIsolate 2019-06-14 09:44:09 +08:00
dracut-kdump-emergency.service Merge kdump-error-handler.sh into kdump.sh 2021-09-14 03:25:54 +08:00
dracut-kdump-emergency.target kdump-emergency: fix "Transaction is destructive" emergency failure 2017-03-31 11:54:30 +08:00
dracut-kdump.sh Add header comment for POSIX compliant scripts 2021-09-15 23:11:37 +08:00
dracut-module-setup.sh ppc64/ppc64le: drop cpu online rule in 40-redhat.rules in kdump initramfs 2021-12-23 15:40:23 +08:00
dracut-monitor_dd_progress monitor-dd-progress fix 2013-06-25 16:45:59 +08:00
early-kdump-howto.txt Improves the early-kdump-howto.txt document in several points: 2020-03-12 23:31:34 +08:00
fadump-howto.txt Clear old crashkernl=auto in comment and doc 2021-08-05 17:54:20 +08:00
kdump-dep-generator.sh logger: source the logger file individually 2021-01-20 14:13:44 +08:00
kdump-in-cluster-environment.txt Add fence_kdump support for generic clusters 2014-04-03 14:43:06 +08:00
kdump-lib-initramfs.sh Add header comment for POSIX compliant scripts 2021-09-15 23:11:37 +08:00
kdump-lib.sh factor out kdump_get_arch_recommend_crashkernel 2022-01-05 09:40:24 +08:00
kdump-logger.sh Add header comment for POSIX compliant scripts 2021-09-15 23:11:37 +08:00
kdump-migrate-action.sh kdump/ppc64: rebuild initramfs image after migration 2021-07-21 10:53:59 +08:00
kdump-restart.sh kdump/ppc64: rebuild initramfs image after migration 2021-07-21 10:53:59 +08:00
kdump-udev-throttler Make udev reload rules quiet during bootup 2018-12-06 17:44:03 +08:00
kdump.conf introduce the auto_reset_crashkernel option to kdump.conf 2022-01-05 09:40:24 +08:00
kdump.conf.5 introduce the auto_reset_crashkernel option to kdump.conf 2022-01-05 09:40:24 +08:00
kdump.service kdump.service: use ConditionKernelCommandLine=crashkernel 2020-10-27 12:22:36 -04:00
kdump.sysconfig Disable CMA in kdump 2nd kernel 2021-05-13 17:13:39 +08:00
kdump.sysconfig.aarch64 sysconfig: make kexec_file_load as default option on aarch64 2021-11-12 11:46:31 +08:00
kdump.sysconfig.i386 Disable CMA in kdump 2nd kernel 2021-05-13 17:13:39 +08:00
kdump.sysconfig.ppc64 Disable CMA in kdump 2nd kernel 2021-05-13 17:13:39 +08:00
kdump.sysconfig.ppc64le sysconfig: make kexec_file_load as default option on ppc64le 2021-11-12 11:47:27 +08:00
kdump.sysconfig.s390x kdump.sysconfig.s390: Remove "prot_virt" from kdump kernel cmdline 2021-07-20 15:57:05 +08:00
kdump.sysconfig.x86_64 Revert "Revert "x86_64: enable the kexec file load by default"" 2021-07-14 02:03:10 +08:00
kdumpctl try to reset kernel crashkernel when kexec-tools updates the default crashkernel value 2022-01-05 09:40:24 +08:00
kdumpctl.8 rewrite reset_crashkernel to support fadump and to used by RPM scriptlet 2022-01-05 09:40:24 +08:00
kexec-kdump-howto.txt Document/kexec-kdump-howto.txt: improve notes for kdump_pre and kdump_post scripts 2021-11-16 13:30:29 +08:00
kexec-tools.spec try to reset kernel crashkernel when kexec-tools updates the default crashkernel value 2022-01-05 09:40:24 +08:00
live-image-kdump-howto.txt Revert "kdumpctl: filter 'root' kernel parameter when running in live images" 2017-04-11 16:03:12 +08:00
mkdumprd mkdumprd: drop mountaddr/mountproto nfs mount options 2021-11-02 10:55:11 +08:00
mkdumprd.8 Doc: improve mkdumprd man page 2020-12-11 14:05:08 +08:00
mkfadumprd bash scripts: reformat with shfmt 2021-09-14 03:25:29 +08:00
sources Release 2.0.23-1 2021-11-08 14:42:45 +08:00
zanata-notes.txt Add a notes for zanata process 2012-12-05 01:23:09 -05:00

README

Adding a patch to kexec-tools
=============================
There is a mailing list kexec@lists.fedoraproject.org where all the dicussion
related to fedora kexec-tools happen. All the patches are posted there for
inclusion and committed to kexec-tools after review.

So if you want your patches to be included in fedora kexec-tools package,
post these to kexec@lists.fedoraproject.org.

One can subscribe to list and browse through archives here.

https://admin.fedoraproject.org/mailman/listinfo/kexec