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

ACL token creation fails in a mixed 1.5 + 1.4 environment #16311

Closed
carobme opened this issue Mar 3, 2023 · 3 comments
Closed

ACL token creation fails in a mixed 1.5 + 1.4 environment #16311

carobme opened this issue Mar 3, 2023 · 3 comments

Comments

@carobme
Copy link

carobme commented Mar 3, 2023

Nomad version

Servers:

Nomad v1.4.4 (7f29429be12098e0f3a09df959d9272aa0654cba)

Cli:

Nomad v1.5.0
BuildDate 2023-03-01T10:11:42Z
Revision fc40c491cacec3d8ec3f2f98cd82b9068a50797c

Operating system and Environment details

Servers: AlmaLinux 8
Cli: Ubuntu 22.10

Issue

Updated to Nomad 1.5 on my laptop (where I usually invoke the cli) this morning. Wanted to create a new ACL token on a cluster that runs 1.4.4. This failed with the error below. Looks like some incompatibility between 1.5 and 1.4 when using the /v1/acl/token endpoint to me. Possibly related to #15999?

Reproduction steps

Just running:

nomad acl token create --name=foo --type=client

Expected Result

Token gets created successfully.

Actual Result

Creating the token fails with

Error creating token: Unexpected response code: 400 (json: cannot unmarshal string into Go struct field ACLToken.ExpirationTTL of type time.Duration)

(The same happens if I specify e.g. --ttl=1h.)

Job file (if appropriate)

Nomad Server logs (if appropriate)

[DEBUG] http: request failed: method=PUT path="/v1/acl/token?namespace=%2A" error="json: cannot unmarshal string into Go struct field ACLToken.ExpirationTTL of type time.Duration" code=400
[DEBUG] http: request complete: method=PUT path="/v1/acl/token?namespace=%2A" duration="364.503µs"    

Nomad Client logs (if appropriate)

@carobme
Copy link
Author

carobme commented Mar 3, 2023

I guess this is fixed in the just released 1.4.5: #16005

Will check on Monday and close the issue, if successful.

@jrasell
Copy link
Member

jrasell commented Mar 3, 2023

Hi @carobme, yes this should be fixed by the PR you linked. I'll keep this open and assigned it myself; please let us know your results once you've had a chance to test. Thanks!

@jrasell jrasell self-assigned this Mar 3, 2023
@jrasell jrasell added this to Needs Triage in Nomad - Community Issues Triage via automation Mar 3, 2023
@jrasell jrasell moved this from Needs Triage to In Progress in Nomad - Community Issues Triage Mar 3, 2023
@carobme
Copy link
Author

carobme commented Mar 6, 2023

Updated the servers to 1.4.4: Creating ACL tokens from the 1.5.0 cli works again. Closing the issue. Thanks @jrasell!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants