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

Cannot use short node-id for detaching nomad volumes #8963

Closed
hongkongkiwi opened this issue Sep 25, 2020 · 3 comments · Fixed by #9041
Closed

Cannot use short node-id for detaching nomad volumes #8963

hongkongkiwi opened this issue Sep 25, 2020 · 3 comments · Fixed by #9041

Comments

@hongkongkiwi
Copy link

Nomad version

Nomad v0.12.4 (8efaee4)

(same error with v0.12.5)

Operating system and Environment details

Linux builder0 4.15.0-112-generic 113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Issue

When using nomad volume detach we cannot use a shortform of the node-id.

For example:
nomad volume detach builder0 "35750b4b" is rejected with error

Error detaching volume: Unexpected response code: 500 (rpc error: rpc error: missing external node ID: node lookup failed: index error: UUID must be 36 characters)

But using nomad detach builder0 "35750b4b-b831-5f36-6999-b6533994e02b" is accepted.

I expect to be able to use the shortform, like it can be used in other places. Also, when using nomad volume status, only the shortform node-id is presented, so it's expected we can then use it to perform an action.

@tgross
Copy link
Member

tgross commented Sep 25, 2020

Hi @hongkongkiwi! Yup, that looks like a clearcut bug to me. https://github.com/hashicorp/nomad/blob/v0.12.5/command/volume_detach.go#L47 suggests we should be doing the prefix search, but that must be misconfigured somehow.

@tgross
Copy link
Member

tgross commented Oct 7, 2020

I've merged a fix in #9041 and that will ship in the upcoming 0.13 release. Thanks again @hongkongkiwi!

@github-actions
Copy link

github-actions bot commented Nov 1, 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 Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants