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 get status for jobs with a dash in job ID #3141

Closed
VascoVisser opened this issue Aug 30, 2017 · 6 comments · Fixed by #3203
Closed

cannot get status for jobs with a dash in job ID #3141

VascoVisser opened this issue Aug 30, 2017 · 6 comments · Fixed by #3203

Comments

@VascoVisser
Copy link

Nomad version

Nomad v0.6.1
Nomad v0.6.2

Operating system and Environment details

Linux 4.4.0-62-generic #83-Ubuntu SMP x86_64 GNU/Linux

Issue

Starting from nomad 0.6.1 I am not able to get the status for a job via the cli if that job has a dash in its name.

Reproduction steps

  • download nomad 0.6.1 or 0.6.2
  • start nomad: nomad agent -dev without any additional config
  • run nomad status foo-bar

output:

Error querying search with id: "Unexpected response code: 500 (alloc lookup failed: index error: Input (without hyphens) must be even length)"

expected output (the same as when querying for a job ID without a dash):

Unable to resolve ID: "foo-bar"

Nomad Server logs (if appropriate)

    2017/08/31 00:15:40.243520 [ERR] http: Request /v1/search, error: alloc lookup failed: index error: Input (without hyphens) must be even length
    2017/08/31 00:15:40.244141 [DEBUG] http: Request /v1/search (818.813µs)
@dadgar
Copy link
Contributor

dadgar commented Aug 30, 2017

Hey this has been fixed and will be out in 0.6.3. In the meantime please use nomad job status

@dadgar dadgar closed this as completed Aug 30, 2017
@fho
Copy link
Contributor

fho commented Sep 13, 2017

@dadgar the problem still happens with nomad 0.6.3.

[root@sb-fho-643 (screen) ~] nomad -v                                                                                                                                        
Nomad v0.6.3                                                                                                                                                                 
[root@sb-fho-643 (screen) ~] nomad status arregistry-service                                                                                                                 
Error querying search with id: "Unexpected response code: 500 (alloc lookup failed: index error: Input (without hyphens) must be even length)"                               
[root@sb-fho-643 (screen) ~] nomad status user-service  
Error querying search with id: "Unexpected response code: 500 (alloc lookup failed: index error: Input (without hyphens) must be even length)"                               

Can you reopen the ticket?

dadgar added a commit that referenced this issue Sep 13, 2017
This PR fixes:
* UUID lookup with hyphens and odd length. The math was wrong. There is
now a test that ranges over all possible values.
* Fixes an unreported issue that could be hit when a job has more than 4
hyphens in it as UUID lookup doesn't allow that.

Fixes #3141
@dadgar
Copy link
Contributor

dadgar commented Sep 13, 2017

@fho Sorry about that. Added tests to cover all possible values and have fixed this.

dadgar added a commit that referenced this issue Sep 13, 2017
This PR fixes:
* UUID lookup with hyphens and odd length. The math was wrong. There is
now a test that ranges over all possible values.
* Fixes an unreported issue that could be hit when a job has more than 4
hyphens in it as UUID lookup doesn't allow that.

Fixes #3141
chelseakomlo pushed a commit that referenced this issue Sep 14, 2017
This PR fixes:
* UUID lookup with hyphens and odd length. The math was wrong. There is
now a test that ranges over all possible values.
* Fixes an unreported issue that could be hit when a job has more than 4
hyphens in it as UUID lookup doesn't allow that.

Fixes #3141
@metroidprototype
Copy link

I'm still seeing this in both 0.6.3 and 0.7.0-beta:

[rampal@latveria bin]$ nomad -v
Nomad v0.6.3
[rampal@latveria bin]$ nomad status splunk-forwarder
Error querying search with id: "Unexpected response code: 404 (404 page not found\n)"
[rampal@latveria bin]$ nomad -v
Nomad v0.7.0-beta1
[rampal@latveria bin]$ nomad status splunk-forwarder
Error querying search with id: "Unexpected response code: 404 (404 page not found\n)"
[rampal@latveria bin]$

Rolling my binary back to 0.5.6 works fine.

@dadgar
Copy link
Contributor

dadgar commented Oct 5, 2017

@metroidprototype I believe you may have just upgraded the CLI binary and not the servers/clients as well. I just tried with the job name you gave on 0.7.0-beta1 and it worked correctly.

@github-actions
Copy link

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

Successfully merging a pull request may close this issue.

4 participants