From 4bf623d475f458e72877468c1831c2136d95e3eb Mon Sep 17 00:00:00 2001 From: John Morrissey Date: Thu, 1 Aug 2019 16:22:15 -0400 Subject: [PATCH] avoid a panic on failed creds polling (#7238) --- command/agent/auth/alicloud/alicloud.go | 2 +- command/agent/auth/aws/aws.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/agent/auth/alicloud/alicloud.go b/command/agent/auth/alicloud/alicloud.go index 680a1ddbab..dbccdd57c3 100644 --- a/command/agent/auth/alicloud/alicloud.go +++ b/command/agent/auth/alicloud/alicloud.go @@ -207,7 +207,7 @@ func (a *alicloudMethod) pollForCreds(credProvider providers.Provider, frequency return case <-ticker.C: if err := a.checkCreds(credProvider); err != nil { - a.logger.Warn("unable to retrieve current creds, retaining last creds", err) + a.logger.Warn("unable to retrieve current creds, retaining last creds", "error", err) } } } diff --git a/command/agent/auth/aws/aws.go b/command/agent/auth/aws/aws.go index d3ea600720..f0a0635411 100644 --- a/command/agent/auth/aws/aws.go +++ b/command/agent/auth/aws/aws.go @@ -279,7 +279,7 @@ func (a *awsMethod) pollForCreds(accessKey, secretKey, sessionToken string, freq return case <-ticker.C: if err := a.checkCreds(accessKey, secretKey, sessionToken); err != nil { - a.logger.Warn("unable to retrieve current creds, retaining last creds", err) + a.logger.Warn("unable to retrieve current creds, retaining last creds", "error", err) } } }