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

Modifying device count doesn't cause scheduling #6644

Closed
cgbaker opened this issue Nov 7, 2019 · 1 comment · Fixed by #6647
Closed

Modifying device count doesn't cause scheduling #6644

cgbaker opened this issue Nov 7, 2019 · 1 comment · Fixed by #6647

Comments

@cgbaker
Copy link
Contributor

cgbaker commented Nov 7, 2019

Nomad version

Nomad 0.9.0, 0.9.6, 0.10.1

Operating system and Environment details

MacOS, example device plugin

Issue

After updating the device count in the resources stanza, the scheduler does not detect the need for a destructive allocation update, and the updated device count is not reflected in the updated allocation.

The reason is, at least, that the task update check does not consider the new device field:
https://github.com/hashicorp/nomad/blob/v0.10.1/scheduler/util.go#L399-L404

Reproduction steps

  1. Run job and note allocation resources:

Device Stats
hashicorp/example/hello[hello-1] 1

  1. Modify job to increase device "example" count, note that allocation is updated:
Allocation "0abefd49" modified: node "a1a38f1b", group "cache"
  1. Examine allocation resources, no new device was attached.

Job file (if appropriate)

job "example" {
  datacenters = ["dc1"]
  group "cache" {
    task "redis" {
      driver = "docker"
      config {
        image = "redis:3.2"
      }
      resources {
        device "example" {
          count = 1
        }
      }
    }
  }
}

Nomad Server logs (if appropriate)

On job update:

    2019-11-07T16:47:30.580Z [DEBUG] worker.service_sched: reconciled current state with desired state: eval_id=aba15a40-2bb7-74f7-8b47-651f81445050 job_id=example namespace=default results="Total changes: (place 0) (destructive 0) (inplace 1) (stop 0)
Desired Changes for "cache": (place 0) (inplace 1) (destructive 0) (stop 0) (migrate 0) (ignore 0) (canary 0)"
@cgbaker cgbaker self-assigned this Nov 7, 2019
@cgbaker cgbaker changed the title Modifying device count doesn't Modifying device count doesn't cause scheduling Nov 7, 2019
@cgbaker cgbaker added this to the 0.10.2 milestone Nov 7, 2019
@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 Nov 17, 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.

1 participant