Mike Percy has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/5442

Change subject: KUDU-1776: Fix "kudu remote_replica copy" connecting to 
wildcard address
......................................................................

KUDU-1776: Fix "kudu remote_replica copy" connecting to wildcard address

"remote_replica copy" asks the source server for its bound address,
but that address could be wildcard (0.0.0.0) in a real cluster,
and if same address is stuffed in RPC, it fails the validation
at the source tablet server:

tablet_id: "834e7673f32e4802bdf26f9fff9162ef"
copy_peer_uuid: "893679e1b1dd4342bf1fb8f058ec2789"
copy_peer_addr {
    host: "0.0.0.0"
    port: 7050
}
UNKNOWN_ERROR: Invalid wildcard address to tablet copy from: 0.0.0.0 (resolved 
to 0.0.0.0)

Fix: Tool remote_replica calls GetStatus RPC on a remote server which is
expected to return host/port information belonging to remote RPC server.
However, if the remote RPC was bound to wildcard ip address, the returned
host ip contains 0.0.0.0. This patch adds HostPortFromSockaddrReplaceWildcard
which helps to replace the wildcard with hostname of the remote server.

Testing: Patch makes few changes to external_mini_cluster such that it
supports binding to wildcard ip now. This is coupled with few consolidations
around bind_rpc_address_ fields which are shared between masters and
tablet servers, hence moved that up in the class hierarchy.

Change-Id: Ie5d0a37b39a3774caab5b5d8dba3d9750bf5f21f
Reviewed-on: http://gerrit.cloudera.org:8080/5378
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <[email protected]>
(cherry picked from commit 8a7871c47897d801d7be2697a28c2ff006a696ee)
---
M src/kudu/integration-tests/external_mini_cluster.cc
M src/kudu/integration-tests/external_mini_cluster.h
M src/kudu/integration-tests/log-rolling-itest.cc
M src/kudu/server/server_base.cc
M src/kudu/tools/kudu-tool-test.cc
5 files changed, 89 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/5442/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5442
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5d0a37b39a3774caab5b5d8dba3d9750bf5f21f
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: branch-1.2.x
Gerrit-Owner: Mike Percy <[email protected]>
Gerrit-Reviewer: Dinesh Bhat <[email protected]>

Reply via email to