mirror of https://github.com/k3s-io/k3s.git
Add context to agent token validation error
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c11c06cad4
)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/12044/head
parent
51fb5b7843
commit
f13bf11348
|
@ -351,7 +351,7 @@ func createProxyAndValidateToken(ctx context.Context, cfg *cmds.Agent) (proxy.Pr
|
|||
for {
|
||||
newToken, err := clientaccess.ParseAndValidateToken(proxy.SupervisorURL(), cfg.Token, options...)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
logrus.Errorf("Failed to validate connection to cluster at %s: %v", cfg.ServerURL, err)
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return nil, ctx.Err()
|
||||
|
|
Loading…
Reference in New Issue