OBS User unknown 2008-06-22 23:02:01 +00:00 committed by Git OBS Bridge
parent 09040147d2
commit 50b1dc8fcf
8 changed files with 29 additions and 215 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2565583259e16579c49d2ab4532fd2d7443458638f65fb0fa2f02ba12b7492b4
size 41978

3
kdump-0.3.4.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dba89f04516e3e7d7351f5dcc4d244b90952bc3daa5fab16796ef4789823d429
size 42832

View File

@ -1,20 +0,0 @@
---
README | 7 +++++++
1 file changed, 7 insertions(+)
--- a/README
+++ b/README
@@ -80,6 +80,13 @@ The recommended values by architecture f
ia64: crashkernel=512M (on small machines use 256M)
ppc64: crashkernel=128M@32M
+NOTE: The memory sizes are only "recommended". It really depends on the amount
+of memory and number of CPUs/nodes of the system how much memory will be needed
+in the caputure kernel to boot the kdump system and to take the dump.
+Therefore, if the kdump capture system doesn't come up, try to increase the
+memory size. Powers of two (2^n) are *not* necessary but the "natural" choice
+for memory sizes.
+
After setting the boot loader option, activate the Kdump init script, which is
not activated by default. To do this, use the YaST System Services (Runlevel)
module. Alternately, enable the service on the command line with the following

View File

@ -1,25 +0,0 @@
From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Set panic_on_unrecovered_nmi on kdump load
References: bnc#388736
It makes sense to generate a dump when NMI is encountered.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
init/kdump | 3 +++
1 file changed, 3 insertions(+)
--- a/init/kdump
+++ b/init/kdump
@@ -214,6 +214,9 @@ load_kdump()
if rc_status ; then
result="Success"
echo 1 > /proc/sys/kernel/panic_on_oops
+ if [ -f /proc/sys/kernel/panic_on_unrecovered_nmi ] ; then
+ echo 1 > /proc/sys/kernel/panic_on_unrecovered_nmi
+ fi
else
echo $result
fi

View File

@ -1,26 +0,0 @@
From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Fix detection of kernel
References: bnc#394216
When KDUMP_KERNELVER="kdump" (on ppc64 because there's still a kernel-kdump
package) was set, then the script failed to find the kernel. The problem was
that it checked for a relocatable kernel, but, of course, the kernel-kdump
is not relocatable.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
init/kdump | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/init/kdump
+++ b/init/kdump
@@ -88,7 +88,7 @@ check_kernel ()
# if it doesn't contain 'kdump' in the name,
# check for relocatability
- if [[ $(basename "$kernel") == *kdump* ]] &&
+ if [[ $(basename "$kernel") != *kdump* ]] &&
! $KDUMP_IDENTIFY_KERNEL -r $kstr &>/dev/null ; then
return 1
fi

View File

@ -1,130 +0,0 @@
From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Add udev rule to reload kdump
References: bnc#389658
This patch
- implements "try-restart" in the init script
- adds a udev rule that uses "try-restart" to reload the kdump kernel
in case of a memory or CPU hot plug event
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
Makefile | 1 +
init/kdump | 46 ++++++++++++++++++++++++++++++++++------------
udev/70-kdump.rules | 12 ++++++++++++
udev/Makefile | 9 +++++++++
4 files changed, 56 insertions(+), 12 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@ install:
make -C init install
make -C gdb install
make -C config install
+ make -C udev install
clean:
make -C src clean
--- a/init/kdump
+++ b/init/kdump
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
#
# Copyright 2005 Red Hat, Inc.
# Author: Jeff Moyer <jmoyer@redhat.com>
@@ -36,6 +36,25 @@ KDUMP_IDENTIFY_KERNEL=/usr/sbin/kdump-id
BOOTDIR="/boot"
+#
+# Checks if currently a kdump kernel is loaded.
+#
+# Returns: 0 (true) if a kdump kernel is loaded,
+# 1 (false) if the kdump kernel is not loaded and
+# -1 (false) if the feature is not implemented (too old kernel)
+kdump_kernel_loaded()
+{
+ if [ -r /sys/kernel/kexec_crash_loaded ]; then
+ if [ "$(cat /sys/kernel/kexec_crash_loaded)" = "1" ]; then
+ return 0
+ else
+ return 1
+ fi
+ else
+ return -1
+ fi
+}
+
# The default dumper
#
# Clean up old stuff if necessary, check the free size
@@ -303,24 +322,27 @@ case "$1" in
fi
;;
status)
- if [ -r /sys/kernel/kexec_crash_loaded ]; then
- if [ "$(cat /sys/kernel/kexec_crash_loaded)" = "1" ]; then
- echo "kdump kernel loaded"
- else
- echo "kdump kernel not loaded"
- fi
- else
- echo "not implemented"
- fi
+ kdump_kernel_loaded
+ case $? in
+ 0) echo "kdump kernel loaded" ;;
+ 1) echo "kdump kernel not loaded" ;;
+ -1) echo "not implemented" ;;
+ esac
;;
restart|reload)
$0 stop
$0 start
;;
- condrestart)
+ condrestart|try-restart)
+ if kdump_kernel_loaded ; then
+ $0 start
+ else
+ rc_reset
+ fi
+ rc_status
;;
*)
- echo $"Usage: $0 {start|stop|status|restart|reload}"
+ echo $"Usage: $0 {start|stop|status|restart|reload|try-reload}"
exit 1
esac
--- /dev/null
+++ b/udev/70-kdump.rules
@@ -0,0 +1,12 @@
+#
+# Kdump core headers needs to be regnerated if the CPUs or memory changes.
+# For this, reload kdump.
+#
+# Novell Bug #389658
+#
+
+SUBSYSTEM=="cpu", ACTION=="online", PROGRAM="/etc/init.d/kdump try-restart"
+SUBSYSTEM=="cpu", ACTION=="offline", PROGRAM="/etc/init.d/kdump try-restart"
+SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/etc/init.d/kdump try-restart"
+SUBSYSTEM=="memory", ACTION=="remove", PROGRAM="/etc/init.d/kdump try-restart"
+
--- /dev/null
+++ b/udev/Makefile
@@ -0,0 +1,9 @@
+# Simple makefile to build kdump-helper
+#
+# (c) 2008, Bernhard Walle <bwalle@suse.de>, SUSE LINUX Products GmbH
+
+
+install:
+ mkdir -p $(DESTDIR)$(SYSCONFDIR)/udev/rules.d
+ install -m 0644 70-kdump.rules $(DESTDIR)$(SYSCONFDIR)/udev/rules.d
+

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Jun 13 17:34:43 CEST 2008 - bwalle@suse.de
- update to 0.3.4
o try also $(uname -i) to find the makedumpfile.config in
/usr/src/linux-${version}-obj/${arch}/${flavour}
o filter "mem" kernel parameter before loading the kdump kernel
(bnc#393324)
- delete kdump-clarify-README: merged in new version
- delete kdump-default-nmi: merged in new version
- delete kdump-reload-memory-hotplug: merged in new version
- delete kdump-fix-kernel-detection: merged in new version
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jun 01 17:56:40 CEST 2008 - bwalle@suse.de Sun Jun 01 17:56:40 CEST 2008 - bwalle@suse.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package kdump (Version 0.3.3) # spec file for package kdump (Version 0.3.4)
# #
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine # This file and all modifications and additions to the pristine
@ -14,8 +14,8 @@
Name: kdump Name: kdump
License: GPL v2 or later License: GPL v2 or later
BuildRequires: libelf0-devel zlib-devel BuildRequires: libelf0-devel zlib-devel
Version: 0.3.3 Version: 0.3.4
Release: 31 Release: 1
Requires: curl openssh Requires: curl openssh
Recommends: makedumpfile Recommends: makedumpfile
Summary: Script for kdump Summary: Script for kdump
@ -26,10 +26,6 @@ PreReq: %insserv_prereq %fillup_prereq
Url: http://www.suse.de/~bwalle/kdump-helpers/ Url: http://www.suse.de/~bwalle/kdump-helpers/
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source1: 02-keyboard-blink.sh Source1: 02-keyboard-blink.sh
Patch0: %{name}-clarify-README
Patch1: kdump-default-nmi
Patch2: kdump-reload-memory-hotplug
Patch3: kdump-fix-kernel-detection
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
# rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2) # rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2)
Provides: kdump-helpers = 0.2.4 Provides: kdump-helpers = 0.2.4
@ -51,10 +47,6 @@ Authors:
%prep %prep
%setup %setup
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build %build
make CFLAGS="$RPM_OPT_FLAGS" make CFLAGS="$RPM_OPT_FLAGS"
@ -149,6 +141,16 @@ fi
%{_sysconfdir}/udev/rules.d/70-kdump.rules %{_sysconfdir}/udev/rules.d/70-kdump.rules
%changelog %changelog
* Fri Jun 13 2008 bwalle@suse.de
- update to 0.3.4
o try also $(uname -i) to find the makedumpfile.config in
/usr/src/linux-${version}-obj/${arch}/${flavour}
o filter "mem" kernel parameter before loading the kdump kernel
(bnc#393324)
- delete kdump-clarify-README: merged in new version
- delete kdump-default-nmi: merged in new version
- delete kdump-reload-memory-hotplug: merged in new version
- delete kdump-fix-kernel-detection: merged in new version
* Sun Jun 01 2008 bwalle@suse.de * Sun Jun 01 2008 bwalle@suse.de
- set KDUMP_KERNELVER="" on i386 instead of KDUMP_KERNELVER="kdump" - set KDUMP_KERNELVER="" on i386 instead of KDUMP_KERNELVER="kdump"
(with "kdump", the kdump kernel cannot be loaded without manually (with "kdump", the kdump kernel cannot be loaded without manually