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

Job revert API not submitting Consul token #12822

Closed
vincenthuynh opened this issue Apr 29, 2022 · 2 comments · Fixed by #13065
Closed

Job revert API not submitting Consul token #12822

vincenthuynh opened this issue Apr 29, 2022 · 2 comments · Fixed by #13065
Assignees
Labels
theme/api HTTP API and SDK issues type/bug
Milestone

Comments

@vincenthuynh
Copy link

Nomad version

nomad: v1.2.6
consul: v1.11.4

Issue

Unable to revert Nomad job when Consul stanza configured with allow_unauthenticated = false

Reproduction steps

via CLI:

nomad job revert -consul-token CONSUL_TOKEN -verbose slow 14

via API:

$ cat revert.json 
{
    "JobID": "slow",
    "JobVersion": 14,
    "ConsulToken": "CONSUL_TOKEN"
}
$ curl -k -XPOST -H 'x-nomad-token: NOMAD_TOKEN' --data @revert.json https://nmdserver:4646/v1/job/slow/revert

Expected Result

JSON response as seen in: https://www.nomadproject.io/api-docs/jobs#revert-to-older-job-version

Actual Result

job-submitter consul token denied: missing consul token

@tgross tgross added the theme/api HTTP API and SDK issues label May 2, 2022
@tgross
Copy link
Member

tgross commented May 2, 2022

Hi @vincenthuynh! Yeah this looks like a bug. I just checked the code and the ConsulToken field handling is commented out with a TODO! 🤦 Let me check with my colleague about whether there's more work to do there other than just uncommenting it, and I'll report back here.

@github-actions
Copy link

github-actions bot commented Oct 7, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/api HTTP API and SDK issues type/bug
Projects
Development

Successfully merging a pull request may close this issue.

2 participants