-
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
scheduler: warn when system jobs cannot place an alloc #11111
Conversation
When a system or sysbatch job specify constraints that none of the current nodes meet, report a warning to the user. Also, for sysbatch job, mark the job as dead as a result. A sample run would look like: ``` $ nomad job run ./example.nomad ==> 2021-08-31T16:57:35-04:00: Monitoring evaluation "b48e8882" 2021-08-31T16:57:35-04:00: Evaluation triggered by job "example" ==> 2021-08-31T16:57:36-04:00: Monitoring evaluation "b48e8882" 2021-08-31T16:57:36-04:00: Evaluation status changed: "pending" -> "complete" ==> 2021-08-31T16:57:36-04:00: Evaluation "b48e8882" finished with status "complete" but failed to place all allocations: 2021-08-31T16:57:36-04:00: Task Group "cache" (failed to place 1 allocation): * Constraint "${meta.tag} = bar": 2 nodes excluded by filter * Constraint "${attr.kernel.name} = linux": 1 nodes excluded by filter $ nomad job status example ID = example Name = example Submit Date = 2021-08-31T16:57:35-04:00 Type = sysbatch Priority = 50 Datacenters = dc1 Namespace = default Status = dead Periodic = false Parameterized = false Summary Task Group Queued Starting Running Failed Complete Lost cache 0 0 0 0 0 0 Allocations No allocations placed ```
@notnoop I pushed a changelog entry, but I'm not sure if it's good. Feel free to change it before merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@notnoop is out, so I'll try to move this forward! I'm not sure my comment is a blocker, but I'd like to check it out before merging.
Defensively deep copy AllocMetric to avoid side effects from shared map references.
While I don't think this fully encompasses the changes, other bits like marking sysbatch as dead immediately are new so haven't changed from a previous release.
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
When a system or sysbatch job specify constraints that none of the current nodes meet, report a warning to the user.
Also, for sysbatch job, mark the job as dead if no allocation is placed at all. System jobs behavior isn't affected by this.
A sample run would look like: