Commit Graph

11 Commits

Author SHA1 Message Date
Baoquan He
cad991814e kdumpctl: adjust the boot dir if kernel is put in sub dir of /boot
Previously /boot is asumed as the default dir where kernel and initrd
is put. However, the directory containing the running kernel image
on Atomic systems differs in each installation. Usually something like:

/boot/ostree/rhel-atomic-host-b50a015b637c353dc6554c851f8a1212b60d6121a7316715e4a63e2a4113cd72

This means that kdump will not find vmlinuz when installed on an
Atomic host, and thus the kdump service will fail to start.

In this patch, the kdump boot dir finding behaviour is a little changed.
Firstly check whether user has specify a directory explicitly in
/etc/sysconfig/kdump. If yes that is respected. Otherwise we assume
1st kernel and kdump kernel are put in the same place under /boot.
Then find it according /proc/cmdline and append it to /boot/

Note:
So now the KDUMP_BOOTDIR in /etc/sysconfig/kdump is set as empty
by default. If user set KDUMP_BOOTDIR to a directory, then he need to
take care of all related things himself. otherwise kdump script handle
it automatically.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Acked-by: Minfei Huang <mhuang@redhat.com>
2015-01-30 14:53:34 +08:00
WANG Chao
7d8e65d615 ppc64, ppc64le: disable kvm CMA reservation in kdump kernel
By default on powerpc platform, kvm will reserve a relatively large CMA
(128M aligned) at early boot. In kdump kernel, even KVM sounds useless
but still it reserves 128M and makes kdump kernel fail to boot.

Now fix this by adding the following to kernel command line:

"kvm_cma_resv_ratio=0"

which disable the CMA reservation.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-09-26 12:59:04 +08:00
WANG Chao
7c48f71b6f kdump.sysconfig: default to "nofail" mount
Currently we have two issues against mounting filesystems by systemd.
1. If any failure in sysroot.mount, initrd.target won't be reached.
2. If any failure in mounting /etc/fstab, initrd.target won't be reached

Our kdump.sh is in dracut-pre-pivot hook which is ordered after
initrd.target. That means if systemd doesn't reach initrd.target,
pre-pivot service will not run.

Based on above, we can conclude that in order to run kdump.sh,
initrd.target must be reached.

To fix issue 1), we can add rootflags=nofail to 2nd kernel cmdline, so
that initrd.target will not require sysroot.mount. initrd.target
wouldn't care about the failures in sysroot.mount. That means
initrd.target can always be reached whether or not sysroot.mount fails.
So when initrd.target is reached, kdump.sh can be run.

To fix issue 2), we can append "nofail" mount options to every entry in
/etc/fstab. It has almost the same affects as to sysroot.mount.
initrd.target can be reached whether or not mount /etc/fstab fails. So
when initrd.target is reached, kdump.sh can be run.

If the mount failures block kdump from working properly (for example,
the dump target isn't mounted), the error handling will be done by
"default" action specified in /etc/kdump.conf. Otherwise kdump will
ignore the mount failures and dump as expected.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
2013-09-27 15:45:24 +08:00
Baoquan He
070a561da5 Revert: kdump.sysconfig: Add option action_on_fail and set its default as continue
This reverts commit 9e964ff4c6.

Currently, because of dracut implementation, in kdump 'default shell' will
call emergency_shell of dracut. If action_on_fail is enabled, emergency_shell
is skipped. Then 'default shell' won't work either.

Here revert the old commit 9e964ff4 so that take other implementation.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
2013-08-02 14:46:55 +08:00
root
224b700c82 kdump.sysconfig: append "panic=10" to kdump cmdline
When doing kdump If the capture kernel crashes for some reason, the default
behavior appears to be hanging the system without rebooting.  We at least
need an option to reset if the capture kernel crashes.  Business critical
customers tend to want the system to reboot without manual intervention.

Kernel provides a parameter “panic=n” to solve such problem.  If this parameter
is given, the capture kernel will reboot after n seconds in case it panics.

Now add this parameter into “KDUMP_COMMANDLINE_APPEND”, and set the default
waiting time value as 10 seconds.

It's tested on KVM f19, and passed.

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-06-13 11:28:12 +08:00
Baoquan He
9e964ff4c6 kdump.sysconfig: Add option action_on_fail and set its default as continue
Upon encountering a failure, dracut can drop user to emergency shell. But
in kdump environment kdump module wants to do the error handling and
wants to handle error as sepecified by user in kdump.conf file (halt,
reboot etc). Now dracut has provided an option action_on_fail=continue
which means dracut just ignores the failure and continues and expects
module to handle the error.

Modify kdump.sysconfig to pass action_on_fail=continue to dracut.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-06-04 10:55:30 +08:00
dyoung@redhat.com
e074e3952b tune sysconfig to save memory usage
tune sysconfig to save 2nd kernel memory usage

The memory in 2nd kernel is limited, we need to use as less memory as we can
to ensure vmcore capturing ok.

I'm doing below improvements in this patch:

1)
numa support is not necessary for kdump kernel, so disable it by adding numa=off
to save some kernel mm memory usage.

2)
Also add udev.children-max=2 to cmdline to limit max udev chidren processes.

3)
For ppc64, ehea driver will by default enable multi queue feature which will
use a lot of memory. Almost each ppc machine will oom for network(ssh/nfs)
kdump. The module param use_mcs=0 is used to disable multi queue feature.

Tested these params on an IBM machine with 2 numa nodes which ooms even for
local dump to rootfs.

With this patch oom does not happen for local/ssh dump, but for nfs dump oom
still happens in the middle of makedumpfile vmcore copying. So there should be
other improvement yet.

For ehea driver there's other params we can use, but because it's hard to
measure the saved memory, I'm waiting for input from IBM people. We can add
them later.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2013-02-27 10:16:14 +08:00
Dave Young
ec8e35a790 do not mount root twice
Resolves: bz821997

dracut will mount rootfs for us, so we need not pass root to fstab again here.
Here remove the root-mount line.

This will depends on the root=cmdline is right, by default kdump will
inherit it from /proc/cmdline.

Vivek: add document about the assumption for the root= cmdline issue.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2012-07-12 11:15:35 +08:00
Dave Young
b58723d935 update ppc64 sysconfig
sync ppc64 sysconfig from rhel6 kexec-tools

Resolves: bz811449

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-04-19 13:48:50 +08:00
Neil Horman
558bea7d40 Mass Update of RHEL5 patches 2008-06-05 15:18:53 +00:00
Neil Horman
d3c4b95f8a Updating fc7 with all RHEL5 work 2006-12-15 21:05:01 +00:00