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

API type AllocatedTaskResources is missing the Devices field #10063

Closed
michaeldwan opened this issue Feb 22, 2021 · 1 comment · Fixed by #10064
Closed

API type AllocatedTaskResources is missing the Devices field #10063

michaeldwan opened this issue Feb 22, 2021 · 1 comment · Fixed by #10064
Assignees
Labels
stage/waiting-reply theme/api HTTP API and SDK issues

Comments

@michaeldwan
Copy link
Contributor

Nomad version

master

Operating system and Environment details

a go program that imports github.com/hashicorp/nomad/api running on linux

Issue

The /v1/allocation/:alloc_id endpoint includes an array of allocated task devices in the response json but the api.AllocatedTaskResources struct doesn't have a devices field so it's ignored.

Example response:

{
  "status": 200,
  "body": {
    ...
    "AllocatedResources": {
      "Tasks": {
        "default": {
          "Cpu": {
            "CpuShares": 2600
          },
          "Memory": {
            "MemoryMB": 2048
          },
          "Networks": null,
          "Devices": [
            {
              "Vendor": "fly",
              "Type": "volume",
              "Name": "0f0e7205-8865-4974-a3df-838c8103b231",
              "DeviceIDs": [
                "2ff83f62-9e31-4162-81c8-6354f065d581"
              ]
            }
          ]
        }
      },
      ...
    },
    ...
  },
  "response_headers": {
    "content-type": "application/json",
    "vary": "Accept-Encoding",
    "x-nomad-index": "18977619",
    "x-nomad-knownleader": "true",
    "x-nomad-lastcontact": "0",
    "date": "Mon, 22 Feb 2021 18:19:28 GMT",
    "transfer-encoding": "chunked"
  }
}
@shoenig shoenig added this to Needs Triage in Nomad - Community Issues Triage via automation Feb 23, 2021
@shoenig shoenig moved this from Needs Triage to In Progress in Nomad - Community Issues Triage Feb 23, 2021
@shoenig shoenig added stage/waiting-reply theme/api HTTP API and SDK issues labels Feb 23, 2021
@shoenig shoenig self-assigned this Feb 23, 2021
Nomad - Community Issues Triage automation moved this from In Progress to Done Feb 23, 2021
@github-actions
Copy link

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 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/waiting-reply theme/api HTTP API and SDK issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants