diff --git a/.changelog/18985.txt b/.changelog/18985.txt new file mode 100644 index 000000000..432582a85 --- /dev/null +++ b/.changelog/18985.txt @@ -0,0 +1,3 @@ +```release-note:bug +vault: Fixed an issue that could cause Nomad to attempt to renew a Vault token that is already expired +``` diff --git a/client/vaultclient/vaultclient.go b/client/vaultclient/vaultclient.go index b17bb614d..c68424418 100644 --- a/client/vaultclient/vaultclient.go +++ b/client/vaultclient/vaultclient.go @@ -391,6 +391,7 @@ func (c *vaultClient) renew(req *vaultClientRenewalRequest) error { fatal := false if renewalErr != nil && (strings.Contains(renewalErr.Error(), "lease not found or lease is not renewable") || + strings.Contains(renewalErr.Error(), "invalid lease ID") || strings.Contains(renewalErr.Error(), "lease is not renewable") || strings.Contains(renewalErr.Error(), "token not found") || strings.Contains(renewalErr.Error(), "permission denied")) {