Commit Graph

49 Commits

Author SHA1 Message Date
Drew Bailey
cd00d6ded5 make diffSystemAllocsForNode aware of eligibility
diffSystemAllocs -> diffSystemAllocsForNode, this function is only used
for diffing system allocations, but lacked awareness of eligible
nodes and the node ID that the allocation was going to be placed.

This change now ignores a change if its existing allocation is on an
ineligible node. For a new allocation, it also checks tainted and
ineligible nodes in the same function instead of nil-ing out the diff
after computation in diffSystemAllocs
2020-02-03 09:02:08 -05:00
Drew Bailey
580baea231 ignore computed diffs if node is ineligible
test flakey, add temp sleeps for debugging

fix computed class
2020-02-03 09:02:08 -05:00
Drew Bailey
264932dae4 Return FailedTGAlloc metric instead of no node err
If an existing system allocation is running and the node its running on
is marked as ineligible, subsequent plan/applys return an RPC error
instead of a more helpful plan result.

This change logs the error, and appends a failedTGAlloc for the
placement.
2020-01-22 10:07:15 -05:00
Michael Schurter
f12bfdb193 scheduler: update tests with modern error helper 2019-12-02 20:25:52 -08:00
Lang Martin
b1228536e8 system_sched & test cleanup comments 2019-05-01 12:25:26 -04:00
Lang Martin
d1308420b2 system_sched_test extend the test to check ineligible nodes 2019-05-01 12:25:26 -04:00
Lang Martin
178092591b system_sched_test create partially constrained job 2019-05-01 12:25:26 -04:00
Alex Dadgar
0953d913ed Deprecate IOPS
IOPS have been modelled as a resource since Nomad 0.1 but has never
actually been detected and there is no plan in the short term to add
detection. This is because IOPS is a bit simplistic of a unit to define
the performance requirements from the underlying storage system. In its
current state it adds unnecessary confusion and can be removed without
impacting any users. This PR leaves IOPS defined at the jobspec parsing
level and in the api/ resources since these are the two public uses of
the field. These should be considered deprecated and only exist to allow
users to stop using them during the Nomad 0.9.x release. In the future,
there should be no expectation that the field will exist.
2018-12-06 15:09:26 -08:00
Preetha Appan
9f35923db0 fix end to end scheduler test to use new resource structs correctly 2018-10-30 11:06:32 -05:00
Preetha Appan
6966e3c3e8 Make preemption config a struct to allow for enabling based on scheduler type 2018-10-30 11:06:32 -05:00
Preetha Appan
2143fa2ab7 Use scheduler config from state store to enable/disable preemption 2018-10-30 11:06:32 -05:00
Preetha Appan
715d869499 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
Michael Schurter
832b1d5694 switch to new raft DesiredTransition message 2018-03-21 16:49:48 -07:00
Alex Dadgar
48d637dad1 RPC, FSM, State Store for marking DesiredTransistion
fix build tag
2018-03-21 16:49:48 -07:00
Josh Soref
f5b828248c spelling: system 2018-03-11 19:01:19 +00:00
Josh Soref
95662c4cb0 spelling: corresponding 2018-03-11 17:51:41 +00:00
Preetha
781408bbf4 Merge branch 'master' into 0.8 2018-01-03 16:06:38 -06:00
Preetha Appan
aa35b5b9f2 Return an error if evaluation doesn't exist in state store at plan apply time. 2017-12-18 14:55:36 -06:00
Preetha Appan
ef1a2e94f7 Fix some typos 2017-12-14 13:29:27 -06:00
Michael Schurter
e857225129 Fix port labels on mock Alloc/Job/Node 2017-12-08 14:50:06 -08:00
Michael Schurter
04b8f8e7fc Remove structs import from api
Goes a step further and removes structs import from api's tests as well
by moving GenerateUUID to its own package.
2017-09-29 10:36:08 -07:00
Alex Dadgar
ac1539d5d9 Sync namespace changes 2017-09-07 17:04:21 -07:00
Luke Farnell
7a56971508 fixed all spelling mistakes for goreport 2017-08-07 17:13:05 -04:00
Alex Dadgar
950171f094 non-purge deregisters 2017-04-15 17:08:05 -07:00
Alex Dadgar
43ab32f96c Tests compile 2017-02-07 21:30:57 -08:00
Alex Dadgar
248c069652 Merge pull request #2128 from hashicorp/f-dispatch
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Diptanu Choudhury
a709731258 Updated changelog and fixed tests 2016-12-20 11:32:17 -08:00
Alex Dadgar
e80cecf58b Scheduler combines meta from job > group > task 2016-12-15 17:08:38 -08:00
Diptanu Choudhury
58e5282378 Fixed the logic of calculating queued allocation in sys sched (#1724) 2016-09-20 12:05:19 -07:00
Alex Dadgar
60e114a997 Merge pull request #1715 from hashicorp/b-dead-system-nodes
Fix bug where dead nodes weren't properly handled by system scheduler
2016-09-19 11:49:44 -07:00
Alex Dadgar
926f5ee004 Fix bug in which dead nodes weren't being properly handled by system scheduler 2016-09-19 11:49:27 -07:00
Diptanu Choudhury
396e45629b Renaming LocalDisk to EphemeralDisk (#1710)
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Diptanu Choudhury
a6e0077f72 Implemented SetPrefferingNodes in stack 2016-08-30 16:17:50 -07:00
Diptanu Choudhury
0319d5fe64 Added scheduler tests to ensure disk constraints are honored 2016-08-25 15:31:56 -05:00
Diptanu Choudhury
bcab2eb523 Added the chained alloc for system scheduler 2016-08-16 10:49:45 -07:00
Alex Dadgar
bc0e60ddb9 Plan on system scheduler doesn't count nodes who don't meet constraints 2016-08-11 15:26:25 -07:00
Diptanu Choudhury
928bfc6a1e Ensuring system sched doesn't increment queued count when nodes are filtered 2016-08-10 14:33:13 -07:00
Diptanu Choudhury
de4a098d7d Added scheduler tests 2016-08-09 14:52:25 -07:00
Alex Dadgar
3ec1f75d09 Make scheduler mark allocations as lost 2016-08-03 15:57:46 -07:00
Diptanu Choudhury
114245bbf8 Updated tests and added logic to system sched 2016-07-28 14:02:50 -07:00
Diptanu Choudhury
230a59ca16 Fixed some more tests 2016-07-25 17:26:38 -07:00
Diptanu Choudhury
46907a1208 Added a test to ensure system scheduler records the correct number of queued allocations 2016-07-25 17:26:38 -07:00
Diptanu Choudhury
42ba68a201 Removing the queued state of Job Summary and alloc desired status false 2016-07-13 13:20:46 -06:00
Alex Dadgar
1303a4365a Initial plan endpoint implementation - WIP 2016-05-05 11:21:58 -07:00
Alex Dadgar
c3a2bf267a go vet 2016-02-12 16:08:58 -08:00
Alex Dadgar
892c7ddee3 Fix bug, add tests, and cli output 2016-01-04 14:23:06 -08:00
Diptanu Choudhury
51e3c9928b Fixing the scheduler tests 2015-11-16 13:10:57 -08:00
Alex Dadgar
5bfb712a7d Add diffSystemAlloc which gives richer information which node to place a system allocation 2015-10-15 13:14:44 -07:00
Alex Dadgar
b24f48a4ed System scheduler and system stack 2015-10-14 18:39:44 -07:00