Currently kdump service is restarted even when any new file is added in cpu
subsystem. So, it can be restarted multiple times in the cases like loading
of acpi_cpufreq module or online/offline of any cpu.
However, we should see kdump service restart only once in case a new CPU
is added or removed. cpu crash notes buffer is created when a new CPU is
added. It's location does not change when a CPU is onlined/offlined or
acpi_cpufreq driver is loaded. Therefore, no need to restart kdump
service in such cases.
Thus, we need to introduce an extra filter for the kernel name of the
directory created by cpu_add which is KERNEL=="cpu[0-9]*". This will ensure
that kdump service is not restarted when any new file is added in /removed
from cpu subsystem.
Signed-off-by: Pratyush Anand <panand(a)redhat.com>
---
- Although, I have not reproduced this issue on fedora,rather it was in
RHEL6, but it looks like that we should better have this modified rules,
which is more justified.
Changes since v1:
- v1 used to filter with subsystem as 'acpi',which might not work on
playform like powerpc where they have non-acpi method of cpu addition.
98-kexec.rules | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/98-kexec.rules b/98-kexec.rules
index e32ee13cb2e8..5dcf9fae419a 100644
--- a/98-kexec.rules
+++ b/98-kexec.rules
@@ -1,4 +1,4 @@
-SUBSYSTEM=="cpu", ACTION=="add", PROGRAM="/bin/systemctl try-restart kdump.service"
-SUBSYSTEM=="cpu", ACTION=="remove", PROGRAM="/bin/systemctl try-restart kdump.service"
+SUBSYSTEM=="cpu", ACTION=="add", KERNEL=="cpu[0-9]*", PROGRAM="/bin/systemctl try-restart kdump.service"
+SUBSYSTEM=="cpu", ACTION=="remove", KERNEL=="cpu[0-9]*", PROGRAM="/bin/systemctl try-restart kdump.service"
SUBSYSTEM=="memory", ACTION=="online", PROGRAM="/bin/systemctl try-restart kdump.service"
SUBSYSTEM=="memory", ACTION=="offline", PROGRAM="/bin/systemctl try-restart kdump.service"
--
2.9.4