# does the agent's hostname need to be unique from the agent's perspective?

I have several seperate domains that all share the same "pretty" hostname. E.g: node1.dom1.net node2.dom1.net node1.dom2.net node2.dom2.net node1.dom3.net node2.dom3.net

however, due to historical reasons and third-party software restrictions, the hostname functions only returns the node[12] portion. These are solaris boxes, so domainname is used to define the rest. The fqdn's are defined in DNS.

Will this be a problem?

edit retag close merge delete

Sort by » oldest newest most voted

From puppet's perspective the hostname and the DNS name are not relevant at all. The only thing that has to be unique is the certname. The certname is part of the agent's certificate and is used to identify a puppet node.

The certname however defaults to the fqdn fact of your agent, so

on your agent:
# facter fqdn
# puppet agent --configprint certname


should return the same thing. And this value has to be unique across all your machines. Please make sure that the fqdn fact does indeed return the fqdn and not the shortname.

Please also note that when you write a node definition like

node 'node1.dom1.net' {
}


you also don't necessarily need a DNS entry for all your agents because again, the certname (and not the DNS name) of your agent is used to find a proper node definition (at least if you haven't changed that behaviour on you master with a different nodename setting)

more