Skip to content

Commit 58f25ba

Browse files
committed
crash.py: major rewrite
This is not working one would hope and so this now goes tested a bit more. Tons of improvements: - Fixes identifying previous crashes - Fixes patterns we search to be more fixating on the first lines - Generalizes warning / crash kernel snippet routines and logic - Sensible defaults for printing messages - Adds QR code for the first crash pattern line - Adds ssh timeout if a reset is requested, if we can't ssh in them we bail, so CIs can report this kernel as completely broken. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
1 parent d69b972 commit 58f25ba

2 files changed

Lines changed: 232 additions & 114 deletions

File tree

scripts/workflows/generic/crash_watchdog.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ def run_crash_watchdog_on_host(args, this_host_name):
5858
logger.warning(f"Kernel warning and logged to {warning_file}")
5959
warnings_found = True
6060
elif args.save_warnings:
61-
logger.info(f"No kernel warnings detected for host {args.host_name}")
61+
logger.debug(f"No kernel warnings detected for host {this_host_name}")
6262
if crash_file:
6363
crashed = True
6464
logger.warning(f"Crash detected and logged to {crash_file}")
6565
else:
66-
logger.info(f"No crash detected for host {args.host_name}")
66+
logger.debug(f"No crash detected for host {this_host_name}")
6767
return crashed, [crash_file], warnings_found, warning_file
6868

6969
def run_crash_watchdog_all_hosts(args):
@@ -83,11 +83,11 @@ def run_crash_watchdog_all_hosts(args):
8383
if host_crash_detected and crash_file:
8484
crash_detected = True
8585
crash_files.append(crash_file)
86-
logger.info(f"Crash detected in host {host}, logs saved to {crash_file}")
86+
logger.warning(f"Crash detected in host {host}, logs saved to {crash_file}")
8787
if host_warnings_detected and warnings_file:
8888
warnings_detected = True
8989
warning_files.append(warning_file)
90-
logger.info(f"Kernel warning found on host {host}, logs saved to {warning_file}")
90+
logger.warning(f"Kernel warning found on host {host}, logs saved to {warning_file}")
9191

9292
return crash_detected, crash_files, warnings_detected, warning_files
9393

0 commit comments

Comments
 (0)