Preetha Appan
b7de9570e2
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
851bfb2af7
fix linting
2018-10-16 18:29:49 -05:00
Alex Dadgar
5e67b37aad
use int64
2018-10-16 15:34:32 -07:00
Preetha Appan
3ca71ae935
Change CPU/Disk/MemoryMB to int everywhere in new resource structs
2018-10-16 16:21:42 -05:00
Alex Dadgar
9776141240
review comments
2018-10-15 15:31:13 -07:00
Alex Dadgar
ef82a33329
Check constraints on devices
2018-10-14 13:35:47 -07:00
Alex Dadgar
08e0d2502f
rework device checker
2018-10-13 16:47:53 -07:00
Alex Dadgar
670c7e57dc
add to stack
2018-10-13 12:27:49 -07:00
Alex Dadgar
d52130cc4b
Device feasability checker
2018-10-13 12:27:49 -07:00
Preetha Appan
dfc76b3e1f
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
e30b20e65e
renames
2018-10-04 14:57:25 -07:00
Alex Dadgar
0f2f4797cb
fixing tests
2018-10-04 14:26:19 -07:00
Alex Dadgar
49c2d4f775
Scheduler uses allocated resources
2018-10-02 17:08:25 -07:00
Preetha Appan
47e22f6b7c
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
ed53038e04
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
260b566c91
server
2018-09-15 16:23:13 -07:00
Alex Dadgar
14b65c3378
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
a5a26db04a
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
da0bec03c1
Fix make check errors
2018-09-04 16:03:52 -07:00
Preetha Appan
a2284d0f3e
code review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
f6cbfbfef6
Track top k nodes by norm score rather than top k nodes per scorer
2018-09-04 16:10:11 -05:00
Preetha Appan
4d68d935e4
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
72570e0698
fix linting error
2018-09-04 16:10:11 -05:00
Preetha Appan
31b2102055
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
1ac696da56
more cleanup
2018-09-04 16:10:11 -05:00
Preetha Appan
fc48be3656
added some unit tests for -1 spread score
2018-09-04 16:10:11 -05:00
Preetha Appan
f881c4f266
comment and formatting cleanup
2018-09-04 16:10:11 -05:00
Preetha Appan
2dfdd4874f
fix scoring algorithm when min count == current count
2018-09-04 16:10:11 -05:00
Preetha Appan
35bda8c975
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
7a5791f39e
Implement support for even spread across datacenters, with unit test
2018-09-04 16:10:11 -05:00
Preetha Appan
56de0d0a11
Support implicit spread target to account for remaining desired counts
2018-09-04 16:10:11 -05:00
Preetha Appan
5f1d40e4c3
fix comments
2018-09-04 16:10:11 -05:00
Preetha Appan
fa7e3a3f35
Allow empty spread targets, and validate target percentages.
2018-09-04 16:10:11 -05:00
Preetha Appan
bf84a5985a
Include spreads configured at job level when precomputing weights/desired counts.
2018-09-04 16:10:11 -05:00
Preetha Appan
e2ce63e489
Fix warnings
2018-09-04 16:10:11 -05:00
Preetha Appan
fd697272a7
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
5cd8d1fe82
Some minor changes from code review
2018-09-04 16:10:11 -05:00
Preetha Appan
1340533c99
Fix after rename to ConstraintSetContainsAny
2018-09-04 16:10:11 -05:00
Preetha Appan
3d3a5aa4ad
Fix linting
2018-09-04 16:10:11 -05:00
Preetha Appan
b5042067e7
Remove unnecessary reset
2018-09-04 16:10:11 -05:00
Preetha Appan
db7a8b691f
test for setcontainsany, and treat set_contains same as set_contains_all
2018-09-04 16:10:11 -05:00
Preetha Appan
a236342caa
Address some review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
3f7e0ffa4d
Back out changes to propertyset that were not necessary for affinities
2018-09-04 16:10:11 -05:00
Preetha Appan
00924555a8
Implement affinity support in generic scheduler
2018-09-04 16:10:11 -05:00
Alex Dadgar
bc559d408c
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
21682427f3
scheduler: fix missing err assignment
2018-07-11 14:27:10 -04:00
Nick Ethier
3e7d4302a6
scheduler: better error handling
2018-07-05 11:00:03 -04:00
Nick Ethier
1acbf1daf9
scheduler: fix nil pointer exception
2018-07-02 16:05:38 -04:00
Alex Dadgar
98c7abe541
Tests only use testlog package logger
2018-06-13 15:40:56 -07:00
Alex Dadgar
ab39c513b7
Reset Queued allocs to zero when job stopped
...
When a job is stopped but not purged, we should set the Queued count to
be zero.
2018-06-13 10:46:39 -07:00