Andrew Wong has submitted this change and it was merged. ( 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 a server to broadcast its alias in lieu of an FQDN. A new --host_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_for_test. NOTE: this mini-cluster aliasing is compatible with the existing --rpc_listen_on_unix_domain_socket flag. Client processes need only set --host_for_test, and whatever server has the same --host_for_test will treat that client as local and communicate over a UNIX socket. A test is added that exercises this new functionality. Change-Id: I09a22636748a13f282406119b52021184d92a76f Reviewed-on: http://gerrit.cloudera.org:8080/17850 Reviewed-by: Alexey Serbin <aser...@cloudera.com> Tested-by: Kudu Jenkins --- 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, 350 insertions(+), 58 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved Kudu Jenkins: Verified -- 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: merged Gerrit-Change-Id: I09a22636748a13f282406119b52021184d92a76f Gerrit-Change-Number: 17850 Gerrit-PatchSet: 6 Gerrit-Owner: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)