Reference > PrimaryDNSName Logic

PrimaryDNSName Logic

Previously, the DNS Resolver job sets the PrimaryDNSName (primary_dns_name) of a Node to the resolved DNS name of the smallest IP address integer equivalent among all IP addresses contained by a given Node. If either the backup network or cluster virtual IP addresses have a numerically smaller address than the address of the Node, that address incorrectly updates the PrimaryDNSName of the Node.

In order to solve this issue, the PrimaryDNSName logic is changed as follows:

For a full DNS name (for example, host1.cms.chn.hpe.com),

  • If the short name (that is, host1 in the example) of the full DNS name is NOT equal to the host name, the full DNS name will NOT be considered as the PrimaryDNSName.
  • If the short name (that is, host1 in the example) of the full DNS name is equal to the host name, the full DNS name will be one candidate of the PrimaryDNSName.

    For each candidate,

    1. Covert its related IP address to the integer equivalent, and then retrieve the smallest one.
    2. Take the DNS name of the smallest IP address integer equivalent as the PrimaryDNSName.

For example:

  • Node 1 has three IP addresses: A, B, C; the host name is host1.
  • IP address A is resolved as host1.cms.chn.hpe.com.
  • IP address B is resolved as host2.cms.chn.hpe.com (That is possible, in the cluster environment, some cluster IP addresses can be resolved as cluster names).
  • IP address C is resolved as host1.chn.hpe.com.
  • IP address B is the smallest IP address integer equivalent.

Previously, the DNS Resolver job takes host2.cms.chn.hpe.com as the PrimaryDNSName regardless of the fact that host2 !=host1, because IP address B is the smallest IP address integer equivalent.

Currently, host2.cms.chn.hpe.com is no longer considered as the PrimaryDNSName. Both host1.cms.chn.hpe.com and host1.chn.hpe.com are candidates of the PrimaryDNSName. For these candidates, covert their related IP addresses to the integer equivalents. If A > C, host1.cms.chn.hpe.com is the PrimaryDNSName.