From c9db52433f2e8dcc29c09d1705488c6ea0e2fe45 Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Fri, 19 Sep 2025 11:08:42 -0500 Subject: [PATCH 1/2] add oom check to so-log-check Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com> --- salt/common/tools/sbin/so-log-check | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/salt/common/tools/sbin/so-log-check b/salt/common/tools/sbin/so-log-check index 72ece1919..eb0b84ac4 100755 --- a/salt/common/tools/sbin/so-log-check +++ b/salt/common/tools/sbin/so-log-check @@ -268,6 +268,13 @@ for log_file in $(cat /tmp/log_check_files); do tail -n $RECENT_LOG_LINES $log_file > /tmp/log_check check_for_errors done +# Look for OOM specific errors in /var/log/messages which can lead to odd behavior / test failures +if [[ -f /var/log/messages ]]; then + status "Checking log file /var/log/messages" + if cat /var/log/messages | grep -iE 'out of memory|oom-kill'; then + RESULT=1 + fi +fi # Cleanup temp files rm -f /tmp/log_check_files From d03dd7ac2d97e0f48382f1a134eb4f273d255d26 Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Fri, 19 Sep 2025 11:32:13 -0500 Subject: [PATCH 2/2] check for oom kill only in the last 24 hours Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com> --- salt/common/tools/sbin/so-log-check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-log-check b/salt/common/tools/sbin/so-log-check index eb0b84ac4..e3768da46 100755 --- a/salt/common/tools/sbin/so-log-check +++ b/salt/common/tools/sbin/so-log-check @@ -271,7 +271,7 @@ done # Look for OOM specific errors in /var/log/messages which can lead to odd behavior / test failures if [[ -f /var/log/messages ]]; then status "Checking log file /var/log/messages" - if cat /var/log/messages | grep -iE 'out of memory|oom-kill'; then + if journalctl --since "24 hours ago" | grep -iE 'out of memory|oom-kill'; then RESULT=1 fi fi