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

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

commit 51900735075fca92e67cd9dd290b304604d70a84
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Jun 25 00:12:38 2020 -0700

    [mini_ranger] search for bound port at loopback and wildcard addresses
    
    This patch updates the set of candidate bind addresses for MiniRanger.
    There is an evidence that in some environments it's bound to the
    wildcard IP address, sometimes on a loopback IP address.  The easiest
    way to address the issue is to specify both loopback and wildcard
    addresses as candidates when searching for the bound Ranger's port.
    
    The motivation for this patch was seeing the following test failures
    when running RangerClientTestBase.TestLogging test scenario on
    Ubuntu 14.04:
    
      src/kudu/ranger/ranger_client-test.cc:345: Failure
      Failed
      Bad status: Runtime error: unexpected lsof output: p158341
      f58
      n127.0.0.1:60001
      f243
      n127.0.0.1:47896->127.0.0.1:44711
      f244
      n127.0.0.1:47894->127.0.0.1:44711
      f245
      n127.0.0.1:47898->127.0.0.1:44711
      f246
      n127.0.0.1:47920->127.0.0.1:44711
      f247
      n127.0.0.1:47922->127.0.0.1:44711
    
    I verified that with this patch the RangerClientTestBase.TestLogging
    test scenario successfully completes.
    
    Change-Id: Idcc6835f035fa1af1aeed171a14197e03a60f547
    Reviewed-on: http://gerrit.cloudera.org:8080/16111
    Tested-by: Kudu Jenkins
    Reviewed-by: Attila Bukor <[email protected]>
    Reviewed-by: Andrew Wong <[email protected]>
---
 src/kudu/ranger/mini_ranger.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/ranger/mini_ranger.cc b/src/kudu/ranger/mini_ranger.cc
index 8defe47..713cfb1 100644
--- a/src/kudu/ranger/mini_ranger.cc
+++ b/src/kudu/ranger/mini_ranger.cc
@@ -229,7 +229,7 @@ Status MiniRanger::StartRanger() {
     uint16_t port;
     RETURN_NOT_OK(WaitForTcpBind(process_->pid(),
                                  &port,
-                                 {},
+                                 { "0.0.0.0", "127.0.0.1", },
                                  
MonoDelta::FromMilliseconds(kRangerStartTimeoutMs)));
     LOG(INFO) << "Ranger bound to " << port;
     LOG(INFO) << "Ranger admin URL: " << ranger_admin_url_;

Reply via email to