The roster is the machines: each node's internal domain covers its routes (hq ADR 0191)
The roster published routed names — public ones first, then (in this PR's first take) internal ones told apart by suffix. Neither is needed: a node has one internal domain and every route on it is a name under it, answered by the resolver's per-node wildcard; a node's public domains are public DNS's. routeNamesInTheMesh and NamesServed are removed, and a test pins .Names to the machines.
This commit is contained in:
@@ -169,10 +169,9 @@ func (g *Generator) Graph() Graph { return g.graph }
|
||||
//
|
||||
// - No floor: no header, no localhost, no `127.0.1.1` — those are the machine's, above the region.
|
||||
// - A machine's own line is marked, and its mesh name resolves to its mesh address, not loopback.
|
||||
// - `.Names` is every name the mesh serves (issue 111), so anything on the machine reaching a
|
||||
// routed name through its resolver finds the machine serving it; machines with no address yet
|
||||
// are already left out of the set. A routed name is one alias, itself — a machine has a bare
|
||||
// name beside its full one, a routed name has nothing beside it (issue 157).
|
||||
// - `.Names` is the machines (novox/hq ADR 0191): a route's internal name is under its node's
|
||||
// internal domain and the resolver answers it by wildcard, and a public name is public DNS's.
|
||||
// Machines with no address yet are already left out of the set.
|
||||
const hostsTemplate = "# The mesh's names. This region is replaced whenever a machine joins or leaves.\n" +
|
||||
"{{range .Names}}{{.Address}}\t{{.FQDN}}{{if ne .Name .FQDN}}\t{{.Name}}{{end}}{{if eq .Name $.Node}}\t# this machine{{end}}\n{{end}}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user