Raise a machine in use adopted: keep its firewall, load no dropping table, guard the mesh's own ports, and take only the mesh's own modules (hq ADR 0100)

This commit is contained in:
2026-09-22 17:32:44 +02:00
parent 4811f176fd
commit 5e3dd3f59c
8 changed files with 467 additions and 14 deletions
+7 -1
View File
@@ -72,7 +72,13 @@ func Enrol(ctx context.Context, o Options, sys system.System, control controlPla
if mentions(nodes, o.Node) {
say(" already a node " + o.Node)
} else {
if _, err := control.tell(ctx, "node", "add", o.Node); err != nil {
add := []string{"node", "add", o.Node}
if o.Adopted {
// The controller records the node's mode; an adopted one keeps what it was found with
// until each module is taken (novox/hq ADR 0100).
add = append(add, "--adopted")
}
if _, err := control.tell(ctx, add...); err != nil {
return out, err
}
out.Added = true