Add Host is only performing Hostname Resolution check for added hosts

Details

Description

When hosts are added to the cluster, on Add Host, a Hostname Resolution check is performed. This checks on each host that the other hosts are resolving. For example, if you have Host1, Host2 and Host3. On each host, Ambari confirms Host1, Host2 and Host3 can resolve (by doing this).

socket.gethostbyname(host)

When adding hosts to a cluster via Add Host, Ambari performs the Hostname Resolution check but the list of hosts ONLY includes all added hosts, not any of the hosts already in the cluster. For example, if I add Host4 and Host5 to the cluster, Ambari will check that each of those hosts can resolve Host4 and Host5 but not Host1, Host2 or Host3. This can present a problem if these new hosts Host 4 and Host5 network is mis-configured. They might not be able to resolve the existing cluster hosts and therefore, once we get components installed and started, those components might not function in the cluster correctly. This can become a challenge to diagnose.

Attaching a few screen shots showing what is happening. c6401 + c6402 are part of original cluster and both are passed with the host check. But when I add c6403, it doesn't include the existing hosts c6401/c6402 in the check.

The solution is to include existing hosts in the list of hosts to check resolution. Understandably, this list might be large in a very big cluster, so an option is to ONLY include the set of hosts that include a Master Component (like NameNode, etc).