Preetha Appan
cc295b90de
Implement preemption for system jobs.
...
This commit implements an allocation selection algorithm for finding
allocations to preempt. It currently special cases network resource asks
from others (cpu/memory/disk/iops).
2018-10-30 11:06:32 -05:00
Preetha Appan
22aee7294e
Merge branch 'f-fix-resource-type' of github.com:hashicorp/nomad into f-fix-resource-type
2018-10-16 18:30:12 -05:00
Preetha Appan
53c3f8151b
fix linting
2018-10-16 18:29:49 -05:00
Alex Dadgar
a78cefec18
use int64
2018-10-16 15:34:32 -07:00
Preetha Appan
7c0d8c646c
Change CPU/Disk/MemoryMB to int everywhere in new resource structs
2018-10-16 16:21:42 -05:00
Alex Dadgar
f5a76d8411
review comments
2018-10-15 15:31:13 -07:00
Alex Dadgar
7ecd65109a
Check constraints on devices
2018-10-14 13:35:47 -07:00
Alex Dadgar
5284554fcc
rework device checker
2018-10-13 16:47:53 -07:00
Alex Dadgar
1089e13b14
add to stack
2018-10-13 12:27:49 -07:00
Alex Dadgar
9b5aaac410
Device feasability checker
2018-10-13 12:27:49 -07:00
Preetha Appan
1574e898af
Fix bug in reconciler where terminal allocs on a job already stopped were unnecessarily updated
2018-10-08 21:03:49 -05:00
Alex Dadgar
01f8e5b95f
renames
2018-10-04 14:57:25 -07:00
Alex Dadgar
52f9cd7637
fixing tests
2018-10-04 14:26:19 -07:00
Alex Dadgar
bac5cb1e8b
Scheduler uses allocated resources
2018-10-02 17:08:25 -07:00
Preetha Appan
a10118c461
Add failed follow up to the list of allowed eval trigger reasons
...
needs unit test
2018-09-25 10:49:55 -07:00
Alex Dadgar
6a21f9fe96
Unique TriggerBy for blocked evals
...
Give blocked evals a unique triggerby reason to make debugging a chain
of evaluations easier.
2018-09-24 14:47:49 -07:00
Alex Dadgar
3c19d01d7a
server
2018-09-15 16:23:13 -07:00
Alex Dadgar
3ba62efd5e
Failed/paused deployments do not block migrations
...
This PR changes behavior of the scheduler such that a task group with a
deployment that is failed or paused will not cause the scheduler to skip
migrations.
The reason for this change is that it causes a bad UX when draining
nodes with allocations that are part of a failed/paused deployment.
These operations should not be coupled in any way and this remedies
that.
Prior behavior was still correct, but required either jobs to
transistion to a healthy state or for the node to hit its drain
deadline.
2018-09-10 15:28:45 -07:00
Alex Dadgar
cc92cd92cd
Merge pull request #4642 from hashicorp/b-vet
...
Fix vet errors and use newer go version in travis
2018-09-04 17:04:02 -07:00
Alex Dadgar
c6576ddac1
Fix make check errors
2018-09-04 16:03:52 -07:00
Preetha Appan
751c0eb5a5
code review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
9bc0962527
Track top k nodes by norm score rather than top k nodes per scorer
2018-09-04 16:10:11 -05:00
Preetha Appan
6ed527c636
Use heap to store top K scoring nodes.
...
Scoring metadata is now aggregated by scorer type to make it easier
to parse when reading it in the CLI.
2018-09-04 16:10:11 -05:00
Preetha Appan
65cf4373b3
fix linting error
2018-09-04 16:10:11 -05:00
Preetha Appan
dd5fe6373f
Fix scoring logic for uneven spread to incorporate current alloc count
...
Also addressed other small code review comments
2018-09-04 16:10:11 -05:00
Preetha Appan
e72c0fe527
more cleanup
2018-09-04 16:10:11 -05:00
Preetha Appan
4c624424e6
added some unit tests for -1 spread score
2018-09-04 16:10:11 -05:00
Preetha Appan
92d37acc2a
comment and formatting cleanup
2018-09-04 16:10:11 -05:00
Preetha Appan
7b0a27cad6
fix scoring algorithm when min count == current count
2018-09-04 16:10:11 -05:00
Preetha Appan
bad075f640
Remove hardcoded boosts for even spread.
...
instead, calculate them based on delta between current and minimum value
2018-09-04 16:10:11 -05:00
Preetha Appan
c56873ff37
Implement support for even spread across datacenters, with unit test
2018-09-04 16:10:11 -05:00
Preetha Appan
d091c00dd3
Support implicit spread target to account for remaining desired counts
2018-09-04 16:10:11 -05:00
Preetha Appan
33779abe5f
fix comments
2018-09-04 16:10:11 -05:00
Preetha Appan
5812f906c8
Allow empty spread targets, and validate target percentages.
2018-09-04 16:10:11 -05:00
Preetha Appan
55f276c189
Include spreads configured at job level when precomputing weights/desired counts.
2018-09-04 16:10:11 -05:00
Preetha Appan
fbd0004707
Fix warnings
2018-09-04 16:10:11 -05:00
Preetha Appan
db0d95b09c
Implement spread iterator that scores according to percentage of desired count in each target.
...
Added this as a new step in the stack and some unit tests
2018-09-04 16:10:11 -05:00
Preetha Appan
eccf128c5c
Some minor changes from code review
2018-09-04 16:10:11 -05:00
Preetha Appan
038ed52877
Fix after rename to ConstraintSetContainsAny
2018-09-04 16:10:11 -05:00
Preetha Appan
3a39db3902
Fix linting
2018-09-04 16:10:11 -05:00
Preetha Appan
d5cd2bbddb
Remove unnecessary reset
2018-09-04 16:10:11 -05:00
Preetha Appan
dccb693221
test for setcontainsany, and treat set_contains same as set_contains_all
2018-09-04 16:10:11 -05:00
Preetha Appan
70bfd0c0cb
Address some review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
8685593ec0
Back out changes to propertyset that were not necessary for affinities
2018-09-04 16:10:11 -05:00
Preetha Appan
5eacd6ada4
Implement affinity support in generic scheduler
2018-09-04 16:10:11 -05:00
Alex Dadgar
e1c239daae
Merge pull request #4414 from hashicorp/b-stop-summary
...
Reset Queued allocs to zero when job stopped
2018-07-16 14:32:55 -07:00
Nick Ethier
6b6777359b
scheduler: fix missing err assignment
2018-07-11 14:27:10 -04:00
Nick Ethier
5f6def5b04
scheduler: better error handling
2018-07-05 11:00:03 -04:00
Nick Ethier
030e650e78
scheduler: fix nil pointer exception
2018-07-02 16:05:38 -04:00
Alex Dadgar
300b1a7a15
Tests only use testlog package logger
2018-06-13 15:40:56 -07:00