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

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


The following commit(s) were added to refs/heads/master by this push:
     new af561c6  [mini_ranger] expect Ranger to bind at wildcard address
af561c6 is described below

commit af561c6f4e6ff08aea1bb7a6a30aff7892604978
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu May 14 12:38:36 2020 -0700

    [mini_ranger] expect Ranger to bind at wildcard address
    
    This patch updates the address parameter for WaitForTcpBind() in
    MiniRanger::StartRanger(), expecting the Ranger process to bind to
    a wildcard address instead of local loopback address.
    
    The motivation for this change is the growing evidence that the actual
    bound address for Ranger is a wildcard address, not a loopback one.
    Before this patch, it was necessary to work around this issue at least
    for aarch64 architecture (see https://gerrit.cloudera.org/#/c/15893/).
    
    Change-Id: Ib9fc3b0ac8ffcb74941321588f7110e1dbb61e27
    Reviewed-on: http://gerrit.cloudera.org:8080/15917
    Reviewed-by: Andrew Wong <[email protected]>
    Tested-by: Kudu Jenkins
    Reviewed-by: liusheng <[email protected]>
    Reviewed-by: Hao Hao <[email protected]>
    Reviewed-by: Attila Bukor <[email protected]>
    Reviewed-by: Grant Henke <[email protected]>
---
 src/kudu/ranger/mini_ranger.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/kudu/ranger/mini_ranger.cc b/src/kudu/ranger/mini_ranger.cc
index 8b411d6..fbf9089 100644
--- a/src/kudu/ranger/mini_ranger.cc
+++ b/src/kudu/ranger/mini_ranger.cc
@@ -22,6 +22,7 @@
 #include <string>
 #include <vector>
 
+#include <boost/optional/optional.hpp>
 #include <glog/logging.h>
 
 #include "kudu/gutil/map-util.h"
@@ -226,9 +227,8 @@ Status MiniRanger::StartRanger() {
         { "RANGER_USER", "miniranger" },
     });
     RETURN_NOT_OK(process_->Start());
-    const string ip = "127.0.0.1";
     uint16_t port;
-    RETURN_NOT_OK(WaitForTcpBind(process_->pid(), &port, ip,
+    RETURN_NOT_OK(WaitForTcpBind(process_->pid(), &port, boost::none,
                   MonoDelta::FromMilliseconds(kRangerStartTimeoutMs)));
     LOG(INFO) << "Ranger bound to " << port;
     LOG(INFO) << "Ranger admin URL: " << ranger_admin_url_;

Reply via email to