This patch set implements firmware-assisted dump support for kdump
service. Firmware-assisted dump support depends on existing kdump
infrastructure (kdump scripts) present in userland to save dump
to the disk. Though existing kdump script will work seemlessly, it
still needs to modified to make it aware of presense of firmware-
assisted dump feature during service start and stop. These changes
are tested successfully on a power box with fedora19.
Changes from v4 to v5:
1. Not restoring initrd anymore while switching from fadump to
2. Added support to check for fadump support in default initrd
image to avoid rebuilding muliple times unnecesarily.
3. Removed redundant check in stop_fadump routine. Corrected few
Hari Bathini (8):
kdump: Modify status routine to check for firmware-assisted dump
kdump: Modify kdump script to start the firmware assisted dump.
kdump: Modify kdump script to stop firmware assisted dump
kdump: Take a backup of original default initrd before rebuilding.
kdump: Rebuild default initrd for firmware assisted dump
kdump: Check for /proc/vmcore existence before capturing the vmcore.
kdump: Add firmware-assisted dump howto document
cleanup: Remove "function" keyword from all functions and correct typos
dracut-kdump.sh | 3 +
fadump-howto.txt | 250 +++++++++++++++++++++++++++++++++++++++++++++
kdumpctl | 302 +++++++++++++++++++++++++++++++++++++++++++++---------
3 files changed, 506 insertions(+), 49 deletions(-)
create mode 100644 fadump-howto.txt
When starting kdump service with dump target being ssh host, after
network-online.target, we connect to ssh host and touch the dump
directory to make sure the host is ready to be dumped to.
Chances are after network-online.target, the particular network resource
we interest in isn't ready for connecting to the specified ssh host.
And at that time, we connect to ssh host and fail.
What we should do is to wait for the specific network resource, not
totally depending on network-online.target. But it's relatively
complicated to implement. A simple and direct solution would be try as
many time as it needs to connect to the configured ssh host. However to
avoid a infinitely loop, we time out and fail. I set this time out value
to be 180 seconds, and general speaking, 180 seconds would be enough for
almost any kind of network to be up and ready.
Signed-off-by: WANG Chao <chaowang(a)redhat.com>
kdumpctl | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/kdumpctl b/kdumpctl
index 9cae0c4..0bd6021 100755
@@ -381,8 +381,19 @@ function check_ssh_config()
- ssh -q -i $SSH_KEY_LOCATION -o BatchMode=yes $DUMP_TARGET mkdir -p $SAVE_PATH
+ local _start _delta
+ # Timeout out after 180 seconds, hopefully it's enough.
+ _start=$(date +%s)
+ while : ; do
+ ssh -q -i $SSH_KEY_LOCATION -o BatchMode=yes $DUMP_TARGET mkdir -p $SAVE_PATH
+ _delta=$(($(date +%s) - $_start))
+ if [[ $_ret -eq 0 || $_delta -gt 180 ]]; then
if [ $_ret -ne 0 ]; then
echo "Could not create $DUMP_TARGET:$SAVE_PATH, you probably need to run \"kdumpctl propagate\"" >&2