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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user