Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of consul: handle "not found" errors from Consul when deleting tokens into release/1.4.x #17849

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #17847 to be assessed for backporting due to the inclusion of the label backport/1.4.x.

The below text is copied from the body of the original PR.


In Consul 1.15.0, the Delete Token API was changed so as to return an error when deleting a non-existent ACL token. This means that if Nomad successfully deletes the token but fails to persist that fact, it will get stuck trying to delete a non-existent token forever.

Update the token deletion function to ignore "not found" errors and treat them as successful deletions.

Fixes: #17833
Source for text of error (there's no const in the api package for it): https://github.com/hashicorp/consul/blob/api/v1.22.0/agent/acl_endpoint.go#L470

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/consul-token-delete-api/broadly-busy-fly branch from a3b3539 to b762e26 Compare July 7, 2023 20:22
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 6941f07 into release/1.4.x Jul 7, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/consul-token-delete-api/broadly-busy-fly branch July 7, 2023 20:22
@vercel vercel bot temporarily deployed to Preview – nomad July 7, 2023 20:27 Inactive
@vercel vercel bot temporarily deployed to Preview – nomad-storybook-and-ui July 7, 2023 20:31 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants