This is an automated email from the ASF dual-hosted git repository. joemcdonnell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 0b251cc6bc814b44e94bdaad8e04e794c450ef90 Author: Joe McDonnell <[email protected]> AuthorDate: Thu Sep 8 15:07:36 2022 -0700 IMPALA-11570: tolerate errors from dmesg in finalize.sh finalize.sh does a variety of diagnostic actions at the end of a Jenkins job. The script should try to tolerate errors from subcommands to keep going to other diagnostic actions. dmesg has failed under some circumstances, so this adds logic to tolerate a failure from dmesg. This lets the script continue to resolving minidumps. Testing: - Ran on a configuration where dmesg fails and it proceeded to the rest of the script Change-Id: I772b4d905482e84618c14e4d738fe179fa7a99a8 Reviewed-on: http://gerrit.cloudera.org:8080/18956 Reviewed-by: Michael Smith <[email protected]> Reviewed-by: Wenzhe Zhou <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- bin/jenkins/finalize.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bin/jenkins/finalize.sh b/bin/jenkins/finalize.sh index c8ca19827..0785a9bcf 100755 --- a/bin/jenkins/finalize.sh +++ b/bin/jenkins/finalize.sh @@ -32,12 +32,16 @@ fi rm -rf "${IMPALA_HOME}"/logs_system mkdir -p "${IMPALA_HOME}"/logs_system -dmesg > "${IMPALA_HOME}"/logs_system/dmesg +# Tolerate dmesg failures. dmesg can fail if there are insufficient permissions. +if dmesg > "${IMPALA_HOME}"/logs_system/dmesg ; then -# Check dmesg for OOMs and generate a symptom if present. -if [[ $(grep "Out of memory" "${IMPALA_HOME}"/logs_system/dmesg) ]]; then - "${IMPALA_HOME}"/bin/generate_junitxml.py --phase finalize --step dmesg \ - --stdout "${IMPALA_HOME}"/logs_system/dmesg --error "Process was OOM killed." + # Check dmesg for OOMs and generate a symptom if present. + if [[ $(grep "Out of memory" "${IMPALA_HOME}"/logs_system/dmesg) ]]; then + "${IMPALA_HOME}"/bin/generate_junitxml.py --phase finalize --step dmesg \ + --stdout "${IMPALA_HOME}"/logs_system/dmesg --error "Process was OOM killed." + fi +else + echo "Failed to run dmesg, not checking for OOMs" fi # Check for any minidumps and symbolize and dump them.
