-
Notifications
You must be signed in to change notification settings - Fork 2k
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
quota enforcement for cores
not reported in plan results
#18876
Comments
Hi @henrikjohansen! Unfortunately as it turns out, quota is currently unenforced for cores. The API silently accepts cores because the structure we're accepting is a One challenge of implementing enforcement here is how we decide to calculate quota enforcement of I'll make sure this is getting surfaced to the team to address. (Internal ref: https://github.com/hashicorp/nomad-enterprise/issues/1065) |
Hi @tgross 👋 It seems that cores actually do contribute to the quota and that they get enforced?
Now, running a small job with
Running a second job with
This issue is that it fails without warning the operator ..... Looking at the logs :
|
Thanks for the clarification @henrikjohansen |
cores
not reported in plan results
Hi @henrikjohansen and thanks again for the detail. I am looking into this and have a local reproduction which I will detail below for future readers. Run using a Nomad Enterprise agent with the $ nomad version
Nomad v1.8.1-dev+ent
BuildDate 2024-06-05T18:09:01Z
Revision 2d9e904d5f09c9cb12041bd8a81cfd87f3739b08 Create the quota spec detailed below using name = "default"
limit {
region = "global"
region_limit {
cpu = 1000
memory = 1000
}
} Plan and run the job specification detailed below; notice the plan returns without error and the run errors and no allocations are placed. job "example" {
group "cache" {
network {
port "db" {
to = 6379
}
}
task "redis" {
driver = "docker"
config {
image = "redis:7"
ports = ["db"]
auth_soft_fail = true
}
identity {
env = true
file = true
}
resources {
memory = 256
cores = 1
}
}
}
} |
Co-authored-by: Piotr Kazmierczak <[email protected]>
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. |
Nomad version
Nomad v1.6.2+ent
BuildDate 2023-09-13T17:11:57Z
Revision a93af01
Issue
I was initially a little stumped by #18875 and now I know why :) Normally when you exceed your quota you get a nice little warning like :
... or ...
When you are using cores (instead of cpu) in the resource stanza of your jobfile it fails without warning ...
Expected Result
nomad plan
andnomad job run
should inform the operator of the quota violation regardless of which CPU resource definition they use in their jobfile ...The text was updated successfully, but these errors were encountered: