Unnamed repository
Go to file
Coiby Xu 140da74a34 rewrite reset_crashkernel to support fadump and to used by RPM scriptlet
Rewrite kdumpctl reset-crashkernel KERNEL_PATH as
kdumpctl reset-crashkernel [--fadump=[on|off|nocma]]  [--kernel=path_to_kernel] [--reboot]

This interface would reset a specific kernel to the default crashkernel value
given the kernel path. And it also supports grubby's syntax so there are the
following special cases,
 - if --kernel not specified,
    - use KDUMP_KERNELVER if it's defined in /etc/sysconfig/kdump
    - otherwise use current running kernel, i.e. `uname -r`
 - if --kernel=DEFAULT, the default boot kernel is chosen
 - if --kernel=ALL, all kernels would have its crashkernel reset to the
   default value and the /etc/default/grub is updated as well

--fadump=[on|off|nocma] toggles fadump on/off for the kernel provided
in KERNEL_PATH. If --fadump is omitted, the dump mode is determined by
parsing the kernel command line for the kernel(s) to update.

CoreOS/Atomic/Silverblue needs to be treated as a special case because,
 - "rpm-ostree kargs" is used to manage kernel command line parameters
    so --kernel doesn't make sense and there is no need to find current
    running kernel
 - "rpm-ostree kargs" itself would prompt the user to reboot the system
   after modify the kernel command line parameter
 - POWER is not supported so we can assume the dump mode is always kdump

This interface will also be called by kexec-tools RPM scriptlets [1]
to reset crashkernel.

Note the support of crashkenrel.default is dropped.

[1] 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
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 kdump.conf: add ipv6 example for nfs and ssh dump 2021-01-21 15:36:27 +08:00
kdump.conf.5 Document/kexec-kdump-howto.txt: improve notes for kdump_pre and kdump_post scripts 2021-11-16 13:30:29 +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 rewrite reset_crashkernel to support fadump and to used by RPM scriptlet 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 kdump/ppc64: suppress the error message "Could not find a registered notification tool" from servicelog_notify 2021-12-03 08:29:04 +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
README README: Add a README file 2014-04-02 10:45:36 +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

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