A machine makes its tunnel key first and joins through the tunnel (hq ADR 0169) #52

Merged
mesh-admin merged 5 commits from feat/a-machine-joins-through-the-tunnel into main 2026-10-08 08:24:16 +00:00
Showing only changes of commit 0e57186bf1 - Show all commits
+5 -5
View File
@@ -111,6 +111,11 @@ func Enrol(ctx context.Context, o Options, sys system.System, control controlPla
if err != nil {
return out, err
}
// The enrolment account the token's secret is the password of exists in the mesh's records
// and nowhere on the bus yet (novox/hq 04-ISSUES/146): placed before the machine presents it.
if err := placeTheBusUsers(ctx, control, say); err != nil {
return out, err
}
joining, cancel := context.WithTimeout(ctx, o.Wait)
args := []string{"enrol", "--token", token, "--state", o.State}
if o.Tunnel != "" {
@@ -119,11 +124,6 @@ func Enrol(ctx context.Context, o Options, sys system.System, control controlPla
// its ports and range on and not another that came up since.
args = append(args, "--tunnel", o.Tunnel)
}
// The enrolment account the token's secret is the password of exists in the mesh's records
// and nowhere on the bus yet (novox/hq 04-ISSUES/146): placed before the machine presents it.
if err := placeTheBusUsers(ctx, control, say); err != nil {
return out, err
}
joined, err := control.run(joining, o.Host, args...)
cancel()
if err != nil {