The controller writes no /etc/hosts (hq ADR 0199)
/etc/hosts is the file of the node-hosts-file seat's holder; the controller writes into no file another seat's holder owns, and asks that holder if it ever needs a line there. The private network's module stops asking for the node-names fact; every machine already asks the mesh's one resolver for these names, and the host gives the region back at the next push.
This commit is contained in:
@@ -20,20 +20,6 @@ const SuffixVar = "MESH_INTERNAL_SUFFIX"
|
||||
// rather than reaching a stranger's machine.
|
||||
const DefaultSuffix = "internal"
|
||||
|
||||
// HostsPath is where the names go.
|
||||
//
|
||||
// This is not the `/etc/hosts` floor the design removes. That floor existed because a node had to
|
||||
// reach the mesh's database before its own DNS worked — a fallback for a circularity, and the
|
||||
// circularity is gone. This is the mechanism itself: the complete set of names in this mesh
|
||||
// (novox/hq ADR 0011). Written as a marked region *into* the file rather than as the file: the
|
||||
// rest of it — `localhost`, the machine's own name, other tools' blocks — is the machine's, and
|
||||
// writing it whole replaced all of that (novox/hq issue 128).
|
||||
//
|
||||
// A file rather than a resolver daemon, deliberately, for now: it works on every Linux, needs no
|
||||
// package, and has no failure mode of its own. A daemon becomes necessary when names are wanted
|
||||
// that are not one-per-node — service names, wildcards — and that is not yet true.
|
||||
const HostsPath = "/etc/hosts"
|
||||
|
||||
// Suffix is what internal names end in.
|
||||
func Suffix() string {
|
||||
if v := strings.TrimSpace(os.Getenv(SuffixVar)); v != "" {
|
||||
@@ -48,7 +34,6 @@ var nodeName = regexp.MustCompile(`^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`)
|
||||
// InternalName is a node's name inside the mesh.
|
||||
func InternalName(node string) string { return node + "." + Suffix() }
|
||||
|
||||
// **What remains of a larger file.** The rest wrote /etc/hosts — that is the `node-names` fact now
|
||||
// (catalogue.FactsInto), computed where the graph lives instead of by a module that ran nothing.
|
||||
// The naming stays here, because several things compose a node's internal name and one of them
|
||||
// **What remains of a larger file.** The rest wrote /etc/hosts, which the controller no longer
|
||||
// writes at all (novox/hq ADR 0199): the mesh's resolver answers these names. The naming stays here, because several things compose a node's internal name and one of them
|
||||
// writing the suffix differently would be a name nothing answers to.
|
||||
|
||||
Reference in New Issue
Block a user