Closed putcn closed 7 years ago
no extra config needed for this feature, it's enabled by default as long as the nameservers
is pointing to the bootstrapper server, which in our example cluster-desc.yaml is already doing so.
thanks @typhoonzero, I have no write access to this repo, please help merge the change.
it works by listening to dnsmasq's dhcp event, and add/remove newly added/removed ip and hostname info into the folder of hosts.d, which dnsmasq is monitoring. host record files are named after its mac address. with this change, if the name servers option in cluster.yaml is pointing to bootstrapper's ip address, cluster machines can talk to each other by hostnames. TODOs:
bootstrapper is not able to resolve cluster machines hostname within itself by default, has to manually set name server to itself. i.e. in a command line window in bootstrapper, it will say
Unknown host
if you try "ping node1", since bootstrapper is not using itself as the name server. But this line of command will work if you try within a cluster machine.HA and performance issue for large scaled cluster bootstrapping. see disscussions here Currently this feature is only for experimental or small cluster bootstrapping. fix #580