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
The following commit(s) were added to refs/heads/master by this push:
new 19fbacfc3 KUDU-3507 instruct mini-ranger-{kms} JVM to use IPv4
19fbacfc3 is described below
commit 19fbacfc3685b1ec2ed7f20c0dc22d4bd0618135
Author: Alexey Serbin <[email protected]>
AuthorDate: Mon Oct 16 16:37:07 2023 -0700
KUDU-3507 instruct mini-ranger-{kms} JVM to use IPv4
Per the root cause analysis outlined in another take [1] to address
the issue, it makes sense to limit the network stack of mini-ranger's
and mini-ranger-kms' JVM to IPv4. With that and one more patch [2],
WaitForTcpBind() works as expected and two KMS-related scenarios of the
SecurityITest test now pass where they used to fail before.
[1] https://gerrit.cloudera.org/#/c/20514/
[2] https://gerrit.cloudera.org/#/c/20583/
Change-Id: I2f38a0b7df153108d7072a66813068a764e4e601
Reviewed-on: http://gerrit.cloudera.org:8080/20582
Tested-by: Kudu Jenkins
Reviewed-by: Zoltan Martonka <[email protected]>
Reviewed-by: Yingchun Lai <[email protected]>
---
src/kudu/ranger-kms/mini_ranger_kms.cc | 1 +
src/kudu/ranger/mini_ranger.cc | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/kudu/ranger-kms/mini_ranger_kms.cc
b/src/kudu/ranger-kms/mini_ranger_kms.cc
index 368068895..5952a91eb 100644
--- a/src/kudu/ranger-kms/mini_ranger_kms.cc
+++ b/src/kudu/ranger-kms/mini_ranger_kms.cc
@@ -242,6 +242,7 @@ Status MiniRangerKMS::StartRangerKMS() {
// @todo(zchovan): add link to source
std::vector<string> args({
JoinPathSegments(java_home_, "bin/java"),
+ "-Djava.net.preferIPv4Stack=true", // ensure IPv4 is used
"-Dproc_rangerkms",
Substitute("-Dhostname=$0", host_),
Substitute("-Dlog4j.configuration=file:$0",
diff --git a/src/kudu/ranger/mini_ranger.cc b/src/kudu/ranger/mini_ranger.cc
index 2cf33fd8a..de577bac7 100644
--- a/src/kudu/ranger/mini_ranger.cc
+++ b/src/kudu/ranger/mini_ranger.cc
@@ -193,6 +193,7 @@ Status MiniRanger::StartRanger() {
LOG(INFO) << "Using host: " << host_;
std::vector<string> args({
JoinPathSegments(java_home_, "bin/java"),
+ "-Djava.net.preferIPv4Stack=true", // ensure IPv4 is used
"-Dproc_rangeradmin",
Substitute("-Dhostname=$0", host_),
Substitute("-Dlog4j.configuration=file:$0",