You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by la...@apache.org on 2024/01/21 18:40:29 UTC

(impala) branch master updated: IMPALA-12590: Fix dmesg call during precommit for Ubuntu 20.04

This is an automated email from the ASF dual-hosted git repository.

laszlog pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new c2abf08e4 IMPALA-12590: Fix dmesg call during precommit for Ubuntu 20.04
c2abf08e4 is described below

commit c2abf08e4cca74ba345a453189bbc6cdcd76d592
Author: Laszlo Gaal <la...@cloudera.com>
AuthorDate: Fri Dec 8 19:11:28 2023 +0100

    IMPALA-12590: Fix dmesg call during precommit for Ubuntu 20.04
    
    Ubuntu 20.04 locked down access to the kernel messages, so a call to
    'dmesg' can succeed only when executed with elevated privileges.
    
    This could be a problem during Impala precommit runs, as the finalizer
    script uses 'dmesg' to detect potential OOM-kills during the run.
    
    This patch adds an "escalation" step to the dmesg call: if the regular
    call fails, it issues a second call via 'sudo'.
    
    Change-Id: Ic20193740c6e5cb9e8e155c03bede55184875de5
    Reviewed-on: http://gerrit.cloudera.org:8080/20763
    Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 bin/jenkins/finalize.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/jenkins/finalize.sh b/bin/jenkins/finalize.sh
index 2c8db754d..a0b3380b6 100755
--- a/bin/jenkins/finalize.sh
+++ b/bin/jenkins/finalize.sh
@@ -33,7 +33,8 @@ fi
 rm -rf "${IMPALA_HOME}"/logs_system
 mkdir -p "${IMPALA_HOME}"/logs_system
 # Tolerate dmesg failures. dmesg can fail if there are insufficient permissions.
-if dmesg > "${IMPALA_HOME}"/logs_system/dmesg ; then
+if dmesg > "${IMPALA_HOME}"/logs_system/dmesg 2>/dev/null ||
+    sudo 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