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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user