From 0e57186bf1fa2c6805dbed8ea1061cdefde7ea21 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 8 Oct 2026 01:40:47 +0200 Subject: [PATCH] Place the bus's users before the enrolment's wait begins The installer placed them between making the enrolment's deadline and using it, so a failure returned without cancelling it, and go vet refused the package. --- internal/bootstrap/enrol.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 {