nomad icon indicating copy to clipboard operation
nomad copied to clipboard

Nomad fails to create container API error (400): {"message":"range of CPUShares is from 1 to 10000"}

Open rpramodd opened this issue 7 years ago • 3 comments

If you have a question, prepend your issue with [question] or preferably use the nomad mailing list.

If filing a bug please include the following:

Nomad version

0.8.7

Operating system and Environment details

Windows1709

Issue

2019-02-21T07:57:15Z Not Restarting Error was unrecoverable 2019-02-21T07:57:15Z Driver Failure failed to start task "tool-exec" for alloc "fe6200eb-8056-8f43-24e2-e9820f6c1cbd": Failed to create container: API error (400): {"message":"range of CPUShares is from 1 to 10000"} 2019-02-21T07:57:13Z Driver Downloading image gcr.io/sample_project/new_image:latest 2019-02-21T07:57:13Z Task Setup Building Task Directory 2019-02-21T07:57:13Z Received Task received by client

Reproduction steps

1)create one batch/parameterised job with the resource CPU limit set more than 10000

  1. dispatch one job

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

Job file (if appropriate)

job "win64-job" { type = "batch" datacenters = ["us-central1-a","dc1"]

parameterized { }

constraint { attribute = "${attr.kernel.name}" operator = "=" value = "windows" }

task "tool-exec" { driver = "docker" config { ssl = true image = "sample_image_name" cpu_hard_limit = true } resources { cpu = 12000 } } }

rpramodd avatar Feb 21 '19 12:02 rpramodd

@rpramodd this error is coming from the Docker daemon and is because of the limits there rather than anything Nomad specific - https://github.com/moby/moby/blob/611b23c1a0e9a9f440165a331964923fd1116256/daemon/daemon_windows.go#L38

jrasell avatar Feb 22 '19 16:02 jrasell

Closing based on @jrasell comment above, this is not a Nomad issue per se

preetapan avatar Feb 23 '19 17:02 preetapan

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[bot] avatar Nov 25 '22 02:11 github-actions[bot]