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


The following commit(s) were added to refs/heads/master by this push:
     new b57f56f3f IMPALA-12039 (addendum): Verify presence of pgrep during 
docker build
b57f56f3f is described below

commit b57f56f3f8a6bcecc0b27b7fef0c736a046a3269
Author: Joe McDonnell <[email protected]>
AuthorDate: Mon Apr 10 12:19:38 2023 -0700

    IMPALA-12039 (addendum): Verify presence of pgrep during docker build
    
    As a followup to the fix for IMPALA-12039, this verifies the
    presence of pgrep at docker build time as well as at daemon
    startup time.
    
    Testing:
     - Build docker images locally
     - Ran Redhat 8 dockerised tests
    
    Change-Id: I67e000b64cf6c1ab2225745f6b95b7a5e7ac3d36
    Reviewed-on: http://gerrit.cloudera.org:8080/19713
    Reviewed-by: Andrew Sherman <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 docker/daemon_entrypoint.sh   | 7 +++++++
 docker/install_os_packages.sh | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/docker/daemon_entrypoint.sh b/docker/daemon_entrypoint.sh
index 08deadcab..434ecc840 100755
--- a/docker/daemon_entrypoint.sh
+++ b/docker/daemon_entrypoint.sh
@@ -176,6 +176,13 @@ fi
 # Set ulimit core file size 0.
 ulimit -c 0
 
+# graceful_shutdown_backends.sh requires pgrep, so verify it is present
+# at startup.
+if ! command -v pgrep ; then
+  echo "ERROR: 'pgrep' is not present."
+  exit 1
+fi
+
 # The UTF-8 masking functions rely on the presence of en_US.utf8. Make sure
 # it is present.
 if locale -a | grep en_US.utf8 ; then
diff --git a/docker/install_os_packages.sh b/docker/install_os_packages.sh
index ffc58d8a7..0c97f93a1 100755
--- a/docker/install_os_packages.sh
+++ b/docker/install_os_packages.sh
@@ -162,6 +162,12 @@ if ! hostname ; then
   exit 1
 fi
 
+# graceful_shutdown_backends.sh requires the pgrep utility. Verify it is 
present.
+if ! command -v pgrep ; then
+  echo "ERROR: 'pgrep' is not present."
+  exit 1
+fi
+
 # Impala will fail to start if the permissions on /var/tmp are not set to 
include
 # the sticky bit (i.e. +t). Some versions of Redhat UBI images do not have
 # this set by default, so specifically set the sticky bit for both /tmp and 
/var/tmp.

Reply via email to