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
d11064d6ba
structs and API changes to plan and alloc structs needed for preemption
2018-10-30 11:06:32 -05:00
Preetha Appan
9257387a69
Add number of evictions to DesiredUpdates struct to use in CLI/API
2018-10-30 11:06:32 -05:00
Preetha Appan
5ff4b8e36f
REview feedback
2018-10-30 11:06:32 -05:00
Preetha Appan
5b3bfb63eb
structs and API changes to plan and alloc structs needed for preemption
2018-10-30 11:06:32 -05:00
Michael Schurter
e060174130
ar: fix leader handling, state restoring, and destroying unrun ARs
...
* Migrated all of the old leader task tests and got them passing
* Refactor and consolidate task killing code in AR to always kill leader
tasks first
* Fixed lots of issues with state restoring
* Fixed deadlock in AR.Destroy if AR.Run had never been called
* Added a new in memory statedb for testing
2018-10-19 09:45:45 -07:00
Michael Schurter
a4b4d7b266
consul service hook
...
Deregistration works but difficult to test due to terminal updates not
being fully implemented in the new client/ar/tr.
2018-10-16 16:53:29 -07:00
Alex Dadgar
e401c660e7
Implement lifecycle hooks on the task runner
2018-10-16 16:53:29 -07: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
f9b056e1d1
Replace attributes map with new Attribute object
2018-10-13 14:08:58 -07:00
Alex Dadgar
04ba425dd5
validate constraints/affinities
2018-10-13 12:27:49 -07:00
Alex Dadgar
9b5aaac410
Device feasability checker
2018-10-13 12:27:49 -07:00
Alex Dadgar
bfb4caa2e7
node devices
2018-10-13 12:27:49 -07:00
Alex Dadgar
5a07f9f96e
parse affinities and constraints on devices
2018-10-11 14:05:19 -07:00
Alex Dadgar
a2a56a930c
Diff
2018-10-08 17:02:58 -07:00
Alex Dadgar
6b08b9d6b6
Define device request structs
2018-10-08 15:38:03 -07: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
Alex Dadgar
147d2430a1
allocated resources structs
2018-09-29 18:47:28 -07:00
Alex Dadgar
5c8697667e
Node reserved resources
2018-09-29 18:44:55 -07:00
Alex Dadgar
3183153315
Node resources on client
2018-09-29 17:23:41 -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
e1a102f58c
test allocs fit
2018-09-24 13:59:01 -07:00
Alex Dadgar
d7f5be9148
Better comment on snapshotindex
2018-09-24 13:53:43 -07:00
Alex Dadgar
99498da6ed
Denormalize jobs in plan and ignore resources of terminal allocs
...
Denormalize jobs in AppendAllocs:
AppendAlloc was originally only ever called for inplace upgrades and new
allocations. Both these code paths would remove the job from the
allocation. Now we use this to also add fields such as FollowupEvalID
which did not normalize the job. This is only a performance enhancement.
Ignore terminal allocs:
Failed allocations are annotated with the followup Eval ID when one is
created to replace the failed allocation. However, in the plan applier,
when we check if allocations fit, these terminal allocations were not
filtered. This could result in the plan being rejected if the node would
be overcommited if the terminal allocations resources were considered.
2018-09-24 13:53:43 -07:00
Preetha Appan
996484981c
Fix panic when reschedule policy for allocation can't be looked up
...
because its task group changed
2018-09-05 17:01:02 -05:00
Alex Dadgar
4f89cabd34
Merge pull request #4631 from hashicorp/f-plugin-config
...
Parse plugin configs
2018-09-04 17:04:13 -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
26288b9522
Fix more review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
751c0eb5a5
code review feedback
2018-09-04 16:10:11 -05:00
Preetha Appan
4f8e925b54
Move topk and delay heap to separate packages under lib
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
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
92d37acc2a
comment and formatting cleanup
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
71bff00326
validate spread from job/task group validate methods
2018-09-04 16:10:11 -05:00
Preetha Appan
fbd0004707
Fix warnings
2018-09-04 16:10:11 -05:00
Preetha Appan
5eb82b6260
Validate method, and rename ratio field to percent
2018-09-04 16:10:11 -05:00
Preetha Appan
0037d72fa8
Structs and validation for spread
2018-09-04 16:10:11 -05:00
Preetha Appan
c407e3626f
More review comments
2018-09-04 16:10:11 -05:00
Preetha Appan
dbbb4a957a
Fail validation if system job has affinities
2018-09-04 16:10:11 -05:00
Preetha Appan
0bc030c6fb
Treat set_contains as a synonym of set_contains_all
2018-09-04 16:10:11 -05:00
Preetha Appan
e85a721cfb
Include affinities in job and task diff, and more test cases
2018-09-04 16:10:11 -05:00
Preetha Appan
f06c7ab2ad
Fix Copy method for job and task to include affinities
2018-09-04 16:10:11 -05:00