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

"nomad status" returns 500 for jobs with hyphens in names #3212

Closed
hamann opened this issue Sep 14, 2017 · 2 comments
Closed

"nomad status" returns 500 for jobs with hyphens in names #3212

hamann opened this issue Sep 14, 2017 · 2 comments

Comments

@hamann
Copy link

hamann commented Sep 14, 2017

Nomad version

Nomad v0.6.3

Operating system and Environment details

docker-for-mac/alpine 17.06.2

Issue

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

Reproduction steps

$ cat batch-test.json
{
    "Job": {
        "Region": "global",
        "ID": "batch-test",
        "Name": "batch-test",
        "Type": "batch",
        "Priority": 50,
        "Datacenters": [
            "dc1"
        ],
        "TaskGroups": [
            {
                "Name": "batch-test-group",
                "RestartPolicy": {
                  "Attempts": 0,
                  "Mode": "fail"
                },
                "Tasks": [
                    {
                        "Name": "leader",
                        "Driver": "docker",
                        "Config": {
                            "image": "alpine:latest",
                            "command": "/bin/sleep",
                            "args": ["20"]
                        },
                        "Resources": {
                            "CPU": 20,
                            "MemoryMB": 256,
                            "DiskMB": 10,
                            "IOPS": 0
                        },
                        "LogConfig": {
                           "MaxFiles": 10,
                           "MaxFileSizeMB": 10
                        }
                    }
                ]
            }
        ]
    }
}

$ curl -XPOST -d@batch-test.json $NOMAD_ADDR/v1/jobs
{"EvalID":"5cf50ee7-7cb0-09ef-f2b3-b8f5cf6a5e10","EvalCreateIndex":216,"JobModifyIndex":215,"Warnings":"","Index":216,"LastContact":0,"KnownLeader":false}

$ nomad status
ID          Type   Priority  Status   Submit Date
batch-test  batch  50        pending  09/14/17 12:51:05 UTC

$ nomad status batch-test
Error querying search with id: "Unexpected response code: 500 (alloc lookup failed: index error: Input (without hyphens) must be even length)
@dadgar
Copy link
Contributor

dadgar commented Sep 14, 2017

Hey this PR fixes it: #3203

Will be in 0.7.0. Sorry about this. A work around is to use nomad job status in the mean time.

@dadgar dadgar closed this as completed Sep 14, 2017
@github-actions
Copy link

github-actions bot commented Dec 8, 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 8, 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

No branches or pull requests

2 participants