You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/02/06 05:18:22 UTC

[impala] 03/08: IMPALA-8091 addendum: use absolute path for ntp-wait

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 72b845279edabfc536a331d6a34eafd2160c2097
Author: Michael Brown <mi...@cloudera.com>
AuthorDate: Thu Jan 31 09:52:55 2019 -0800

    IMPALA-8091 addendum: use absolute path for ntp-wait
    
    While ntp-wait is in the default $PATH on Ubuntu, it's not on CentOS.
    Use the absolute path of the binary (same in both flavors).
    
    Testing:
    - Ran privately on CentOS both with and without ntp-wait installed; GVO
      will cover Ubuntu.
    
    Change-Id: I5d709d121a71e62b8ee4027db81b53108f389fdd
    Reviewed-on: http://gerrit.cloudera.org:8080/12369
    Reviewed-by: Philip Zeyliger <ph...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 testdata/cluster/admin | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/testdata/cluster/admin b/testdata/cluster/admin
index 22e7ab3..a407d2c 100755
--- a/testdata/cluster/admin
+++ b/testdata/cluster/admin
@@ -335,9 +335,11 @@ function start_cluster {
         NTP_CANARY=pool.ntp.org
         if ! ping -c 1 -w 5 "${NTP_CANARY}" >/dev/null 2>/dev/null; then
           echo "WARNING: cannot reach ${NTP_CANARY}; ntp sync recommended for Kudu"
-        elif ! ntp-wait --help >/dev/null 2>/dev/null; then
+        # ntp-wait is in /usr/sbin on both CentOS and Debian-based systems, but regular
+        # users don't always have /usr/sbin in $PATH. Use the absolute path.
+        elif ! /usr/sbin/ntp-wait --help >/dev/null 2>/dev/null; then
           echo "WARNING: ntp-wait not installed; ntp sync recommended for Kudu"
-        elif ! ntp-wait -v; then
+        elif ! /usr/sbin/ntp-wait -v; then
           echo "ntp-wait failed; cannot start kudu"
           return 1
         fi