Categories

ID #1095

Why do I only have 6 search domains in my cluster?

Why do I only have 6 search domains in my cluster? I have defined plenty more!

If you keep adding search domains via the partition base entry or otherwise, and there are already 6 in resolv.conf, you will run into a hardcoded limit of the default linux system.

Linux by default defines a maximum of 6 search domains in resolv.conf in the default /usr/include/resolv.h file:

# define MAXDNSRCH 6 /* max # domains in search path */

You're probably better off forcing FQDN use, use using separate resolv.conf files for separate domains.

 

"Hidden" gory details for those who really care:


1) when adding search domains via category property, then there is no limit (you can add as many you want, but only first 8 at most will be taken into account by the system)
2) when there are no search domains in category, then the search domains are computed dynamically, and are composed of the following, and in the following order:
  a) domain names of existing networks
  b) the search domains defined in the cmsh base partition.
The search domains defined in partition take precedence over domain names from network, so if there are 4 search domains in the partition, and 3 domains coming from networks, then we end up with 1 search domain from the network, and 4 search domains from partition.
   so :   6 - numberOfSearchDomainsInPartition  = numberOfSearchDomainsTakenFromNetworkDomainNames
3) the set of networks  the domain names of which are used above in "numberOfSearchDomainsTakenFromNetworkDomainNames" doesn't include "external" networks, Cloud networks named "amazon.com", and the global network.

 

So here: the first one is always the global network, then the search domains from networks, and then the search domains from partition.

Basically, if setting the category "searchdomain" property with multiple search domains, make sure to use the searchdomain list from a valid /etc/resolv.conf as a base for modifications, so, e.g, remove a single search domain, or append one or two more.

Tags: -

Related entries:

You cannot comment on this entry