Accepting request 506254 from home:ptesarik:branches:Kernel:kdump
Fix FADUMP handling. OBS-URL: https://build.opensuse.org/request/show/506254 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=137
This commit is contained in:
parent
1800e0b847
commit
dc11343831
34
kdump-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch
Normal file
34
kdump-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From: Petr Tesarik <ptesarik@suse.com>
|
||||
Date: Mon Jun 26 14:10:33 2017 +0200
|
||||
Subject: Do not reload on CPU/memory hotplug when using FADUMP
|
||||
References: bsc#1040567
|
||||
Upstream: v0.8.17
|
||||
Git-commit: c00516e1cb4f0679f38099880726154a507673ec
|
||||
|
||||
Core headers are only used with kexec-based kdump, not with FADUMP.
|
||||
The whole udev rule can be skipped when using FADUMP.
|
||||
|
||||
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
||||
|
||||
diff --git a/70-kdump.rules.in b/70-kdump.rules.in
|
||||
index 6980c7e..bccb341 100644
|
||||
--- a/70-kdump.rules.in
|
||||
+++ b/70-kdump.rules.in
|
||||
@@ -5,12 +5,16 @@
|
||||
#
|
||||
@else
|
||||
#
|
||||
-# Kdump core headers needs to be regnerated if the CPUs or memory changes.
|
||||
+# Kdump core headers need to be regenerated if the CPUs or memory changes.
|
||||
# For this, reload kdump.
|
||||
#
|
||||
# Novell Bug #389658
|
||||
#
|
||||
|
||||
+@if @ARCH@ ppc ppc64 ppc64le
|
||||
+TEST="/sys/kernel/fadump_registered", PROGRAM="/bin/cat /sys/kernel/fadump_registered", RESULT=="1", GOTO="kdump_end"
|
||||
+@endif
|
||||
+
|
||||
SUBSYSTEM=="memory", ACTION=="add|remove", GOTO="kdump_try_restart"
|
||||
@if @ARCH@ ppc ppc64 ppc64le
|
||||
SUBSYSTEM=="cpu", ACTION=="online|offline", GOTO="kdump_try_restart"
|
40
kdump-fail-if-fadump-cannot-be-registered.patch
Normal file
40
kdump-fail-if-fadump-cannot-be-registered.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From: Petr Tesarik <ptesarik@suse.com>
|
||||
Date: Mon Jun 26 13:22:10 2017 +0200
|
||||
Subject: Fail at startup if fadump cannot be registered
|
||||
References: bsc#1040567
|
||||
Upstream: v0.8.17
|
||||
Git-commit: 99a38e490012da75d83efb83385d42edbea100e9
|
||||
|
||||
If writing "1" into /sys/kernel/fadump_registered fails for whatever
|
||||
reason, do not return success.
|
||||
|
||||
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
||||
|
||||
diff --git a/init/load.sh b/init/load.sh
|
||||
index 1894551..4fc7a82 100755
|
||||
--- a/init/load.sh
|
||||
+++ b/init/load.sh
|
||||
@@ -241,17 +241,19 @@ function load_kdump_fadump()
|
||||
fi
|
||||
|
||||
local msg
|
||||
+ local result=0
|
||||
|
||||
# The kernel fails with EINVAL if registered already
|
||||
# (see bnc#814780)
|
||||
- if [ $(cat "$FADUMP_REGISTERED") != "1" ] ; then
|
||||
- local output=$( (echo 1 > "$FADUMP_REGISTERED") 2>&1)
|
||||
- local result=$?
|
||||
+ if [ "$(cat $FADUMP_REGISTERED)" != "1" ] ; then
|
||||
+ local output
|
||||
|
||||
- if [ $result -eq 0 ] ; then
|
||||
+ output=$( (echo 1 > "$FADUMP_REGISTERED") 2>&1)
|
||||
+ if [ $? -eq 0 ] ; then
|
||||
msg="Registered fadump"
|
||||
else
|
||||
msg="FAILED to register fadump: $output"
|
||||
+ result=1
|
||||
fi
|
||||
else
|
||||
msg="fadump is already registered"
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 26 11:24:47 UTC 2017 - ptesarik@suse.com
|
||||
|
||||
- kdump-fail-if-fadump-cannot-be-registered.patch: Fail at startup
|
||||
if fadump cannot be registered (bsc#1040567).
|
||||
- kdump-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch: Do not
|
||||
reload on CPU/memory hotplug when using FADUMP (bsc#1040567).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 23 12:56:45 UTC 2017 - ptesarik@suse.com
|
||||
|
||||
|
@ -65,6 +65,8 @@ Patch20: %{name}-move-class-SystemCPU-to-header-file.patch
|
||||
Patch21: %{name}-treat-KDUMP_CPUS-0-as-all-available-CPUs.patch
|
||||
Patch22: %{name}-multithreading-by-default.patch
|
||||
Patch23: %{name}-explicitly-request-zFCP-devices.patch
|
||||
Patch24: %{name}-fail-if-fadump-cannot-be-registered.patch
|
||||
Patch25: %{name}-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
@ -148,6 +150,8 @@ cp %{S:1} tests/data/
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user