diff --git a/internal/bootstrap/enrol.go b/internal/bootstrap/enrol.go index a8f39ff..c6b83b9 100644 --- a/internal/bootstrap/enrol.go +++ b/internal/bootstrap/enrol.go @@ -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 {