Skip to content

Commit

Permalink
backport of commit ab36cf0 (#19027)
Browse files Browse the repository at this point in the history
Co-authored-by: Luiz Aoqui <[email protected]>
  • Loading branch information
hc-github-team-nomad-core and lgfa29 authored Nov 8, 2023
1 parent df9dc47 commit f4162ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/18985.txt
Original file line number Diff line number Diff line change
@@ -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
```
1 change: 1 addition & 0 deletions client/vaultclient/vaultclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down

0 comments on commit f4162ef

Please sign in to comment.