Skip to content

Commit a41667c

Browse files
OpTestKernelDump.py: add SLES 16 kdump support and persist crashkernel configuration
Introduce support for configuring kdump on SLES 16 systems to ensure the crashkernel value remains consistent across reboots. Added steps to handle SLES 16 specific behavior, including updating configuration and bootloader settings, so that the corrected crashkernel reservation is preserved and kdump can reliably collect crash dumps Signed-off-by: Shirisha G <shirisha@linux.ibm.com>
1 parent 97a7848 commit a41667c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

testcases/OpTestKernelDump.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def reset_kdump_bootloaded_if_needed(self):
189189
if (self.distro == "sles") and self.version == "16":
190190
log.info("SLES 16 detected: forcing KDUMP_UPDATE_BOOTLOADER=false and restarting kdump.service")
191191
self.c.run_command("sed -i 's/^KDUMP_UPDATE_BOOTLOADER=.*/KDUMP_UPDATE_BOOTLOADER=\"false\"/' /etc/sysconfig/kdump")
192-
self.c.run_command_ignore_fail("systemctl restart kdump.service")
192+
self.c.run_command("kdumptool commandline -c -u")
193193

194194
def is_fadump_param_enabled(self):
195195
'''
@@ -750,6 +750,14 @@ def runTest(self):
750750
self.c.run_command("rm -rf ServiceReport; git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
751751
"python ./servicereport --plugins kdump package --repair", timeout=240)
752752
time.sleep(10)
753+
elif self.distro == "sles" and self.version == "16":
754+
self.cv_HOST.host_check_command("kdumptool")
755+
self.c.run_command("zypper install -y ServiceReport", timeout=240)
756+
output = self.c.run_command("servicereport -r -p kdump || true", timeout=240)
757+
if "Auto Fixed" in "\n".join(output):
758+
log.info("servicereport auto fixed crashkernel, reboot required")
759+
self.reset_kdump_bootloaded_if_needed()
760+
753761
elif self.distro == "sles":
754762
self.cv_HOST.host_check_command("kdumptool")
755763
self.c.run_command("zypper install -y ServiceReport; servicereport -r -p kdump;"

0 commit comments

Comments
 (0)