Andrew Wong has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/17850


Change subject: [mini-cluster] allow using aliases instead of addresses in EMC
......................................................................

[mini-cluster] allow using aliases instead of addresses in EMC

This patch adds a configuration to ExternalMiniClusters to allow masters
and tablet servers to use and broadcast an alias instead of a bound
address. This is useful to simulate the default deployment where the
configuration of --rpc_bind_addresses results in servers broadcasting
their FQDN instead of a bound address.

This entails a couple things:
- The EMC may now use the --dns_addr_resolution_override flag to map
  aliases to the reserved addresses.
- Previously we used Sockaddrs internally and converted them to
  HostPorts to pass around to various functions for remote callers to
  resolve (e.g. TServers pass these to Masters and Masters would
  resolve the HostPort to communicate with TServers). Since the
  HostPorts need to be resolvable remotely, wildcards would be
  substituted with the FQDN. In ExternalMiniClusters, we don't bind to
  the wildcard, but we still need to allow servers to broadcast its
  alias in lieu of an FQDN. A new --host_ports_for_test is added for
  this purpose; all ExternalMasters and ExternalTabletServers set this
  when the configured to use aliases.
  - This also refactors our current Sockaddr-to-HostPort conversions to:
    1) fetch HostPorts directly at call-sites, rather than getting
       Sockaddrs and doing a conversion, and
    2) also account for --host_ports_for_test.

A test is added that exercises this new functionality.

Change-Id: I09a22636748a13f282406119b52021184d92a76f
---
M src/kudu/integration-tests/CMakeLists.txt
A src/kudu/integration-tests/dns_alias-itest.cc
M src/kudu/master/master.cc
M src/kudu/master/master_path_handlers.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/mini-cluster/external_mini_cluster.cc
M src/kudu/mini-cluster/external_mini_cluster.h
M src/kudu/server/rpc_server.cc
M src/kudu/server/rpc_server.h
M src/kudu/server/server_base.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/heartbeater.cc
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/util/net/net_util-test.cc
M src/kudu/util/net/net_util.cc
M src/kudu/util/net/net_util.h
17 files changed, 252 insertions(+), 55 deletions(-)



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I09a22636748a13f282406119b52021184d92a76f
Gerrit-Change-Number: 17850
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <[email protected]>

Reply via email to