Skip to content

Commit

Permalink
Fix kdump/Fadump config
Browse files Browse the repository at this point in the history
ServiceReport fails to estimate correct crashkernel size.
This is a temporary fix to define crashkernel size.

Signed-off-by: Sachin P Bappalige <sachinpb@linux.ibm.com>
  • Loading branch information
Sachin P Bappalige committed Apr 24, 2024
1 parent e4c4fb6 commit 1861545
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions op-test
Original file line number Diff line number Diff line change
Expand Up @@ -693,15 +693,15 @@ class OSdumpfadumpSuite():
def __init__(self):
self.s = unittest.TestSuite()
self.s.addTest(PowerNVDump.KernelCrash_FadumpEnable())
self.s.addTest(PowerNVDump.OpTestMakedump())
self.s.addTest(PowerNVDump.KernelCrash_KdumpDLPAR())
self.s.addTest(PowerNVDump.KernelCrash_KdumpWorkLoad())
self.s.addTest(PowerNVDump.KernelCrash_hugepage_checks())
self.s.addTest(PowerNVDump.KernelCrash_XIVE_off())
self.s.addTest(PowerNVDump.KernelCrash_disable_radix())
self.s.addTest(PowerNVDump.KernelCrash_FadumpNocma())
self.s.addTest(PowerNVDump.OpTestMakedump())
self.s.addTest(PowerNVDump.KernelCrash_KdumpSSH())
self.s.addTest(PowerNVDump.KernelCrash_KdumpNFS())
self.s.addTest(PowerNVDump.KernelCrash_FadumpNocma())

def suite(self):
return self.s
Expand Down
29 changes: 20 additions & 9 deletions testcases/PowerNVDump.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,7 @@ def verify_fadump_reg(self):
if int(res) == 1:
return True
else:
self.c.run_command("echo 1 > /sys/kernel/fadump_registered")
self.c.run_command('\r\n')
self.c.run_command("echo 1 > /sys/kernel/fadump_registered; sleep 10")
self.c.run_command("cat /sys/kernel/fadump_registered")

if not self.is_lpar:
Expand Down Expand Up @@ -330,14 +329,12 @@ def verify_fadump_unreg(self):
if int(res) == 0:
return True
else:
self.c.run_command("echo 0 > /sys/kernel/fadump_registered")
self.c.run_command('\r\n')
self.c.run_command("echo 0 > /sys/kernel/fadump_registered; sleep 10")

if not self.is_lpar:
self.c.run_command("%s > /tmp/opal_log" % BMC_CONST.OPAL_MSG_LOG)
self.c.run_command("dmesg > /tmp/dmesg_log")
self.c.run_command("echo 0 > /sys/kernel/fadump_registered")
self.c.run_command('\r\n')
self.c.run_command("echo 0 > /sys/kernel/fadump_registered; sleep 10")

opal_data = " ".join(self.c.run_command(
"%s | diff -a /tmp/opal_log -" % BMC_CONST.OPAL_MSG_LOG))
Expand Down Expand Up @@ -632,7 +629,7 @@ def setup_fadump(self):
'''
self.cv_SYSTEM.set_state(OpSystemState.OS)
if self.distro == "rhel":
self.c.run_command("git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
self.c.run_command("rm -rf ServiceReport; git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
"python ./servicereport --plugins kdump package --repair", timeout=240)
time.sleep(10)
self.c.run_command("sed -e '/nfs/ s/^#*/#/' -i /etc/kdump.conf; sync")
Expand Down Expand Up @@ -718,7 +715,7 @@ def runTest(self):
self.cv_HOST.host_check_command("kdump")
elif self.distro == "rhel":
self.cv_HOST.host_check_command("kdumpctl")
self.c.run_command("git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
self.c.run_command("rm -rf ServiceReport; git clone https://github.com/linux-ras/ServiceReport; cd ServiceReport;"
"python ./servicereport --plugins kdump package --repair", timeout=240)
time.sleep(10)
elif self.distro == "sles":
Expand All @@ -733,9 +730,11 @@ def runTest(self):
self.cv_HOST.host_enable_kdump_service(os_level)
log.info("========= Testing Only kdump enable followed by crash ===========")
boot_type = self.kernel_crash()
self.verify_dump_file(boot_type)
if self.is_lpar:
log.info("========= Testing kdump with HMC dumprestart ===========")
boot_type = self.kernel_crash(crash_type="hmc")
self.verify_dump_file(boot_type)
self.verify_dump_file(boot_type)


class KernelCrash_DisableAll(PowerNVDump):
Expand Down Expand Up @@ -1127,6 +1126,10 @@ class KernelCrash_XIVE_off(PowerNVDump):
'''

def runTest(self):
obj = OpTestInstallUtil.InstallUtil()
if not obj.update_kernel_cmdline(self.distro, remove_args="default_hugepagesz=1GB hugepagesz=1GB hugepages=80",
reboot=True, reboot_cmd=True):
self.fail("KernelArgTest failed to remove kernel args:default_hugepagesz=1GB hugepagesz=1GB hugepages=80")
self.cv_SYSTEM.goto_state(OpSystemState.OS)
self.setup_test()
log.info("=============== Testing kdump/fadump with xive=off ===============")
Expand Down Expand Up @@ -1171,6 +1174,10 @@ class KernelCrash_disable_radix(PowerNVDump):
'''

def runTest(self):
obj = OpTestInstallUtil.InstallUtil()
if not obj.update_kernel_cmdline(self.distro, remove_args="xive=off",
reboot=True, reboot_cmd=True):
self.fail("KernelArgTest failed to remove kernel args:xive=off")
self.cv_SYSTEM.goto_state(OpSystemState.OS)
self.setup_test()
log.info("Testing kdump/fadump with disable_radix")
Expand Down Expand Up @@ -1279,6 +1286,10 @@ def makedump_check(self):
self.c.run_command("rm -rf dump*")

def runTest(self):
obj = OpTestInstallUtil.InstallUtil()
if not obj.update_kernel_cmdline(self.distro, remove_args="disable_radix",
reboot=True, reboot_cmd=True):
self.fail("KernelArgTest failed to remove kernel args:disable_radix")
self.kernel_crash()
self.makedump_check()

Expand Down

0 comments on commit 1861545

Please sign in to comment.