Commit Graph

36 Commits

Author SHA1 Message Date
Seth Hoenig
b242957990 ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
Tim Gross
b0b7a49439 scheduler: seed random shuffle nodes with eval ID (#12008)
Processing an evaluation is nearly a pure function over the state
snapshot, but we randomly shuffle the nodes. This means that
developers can't take a given state snapshot and pass an evaluation
through it and be guaranteed the same plan results.

But the evaluation ID is already random, so if we use this as the seed
for shuffling the nodes we can greatly reduce the sources of
non-determinism. Unfortunately golang map iteration uses a global
source of randomness and not a goroutine-local one, but arguably
if the scheduler behavior is impacted by this, that's a bug in the
iteration.
2022-02-08 12:16:33 -05:00
Luiz Aoqui
8a427a470a scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
Drew Bailey
7ce0b5017c Events/msgtype cleanup (#9117)
* use msgtype in upsert node

adds message type to signature for upsert node, update tests, remove placeholder method

* UpsertAllocs msg type test setup

* use upsertallocs with msg type in signature

update test usage of delete node

delete placeholder msgtype method

* add msgtype to upsert evals signature, update test call sites with test setup msg type

handle snapshot upsert eval outside of FSM and ignore eval event

remove placeholder upsertevalsmsgtype

handle job plan rpc and prevent event creation for plan

msgtype cleanup upsertnodeevents

updatenodedrain msgtype

msg type 0 is a node registration event, so set the default  to the ignore type

* fix named import

* fix signature ordering on upsertnode to match
2020-10-19 09:30:15 -04:00
Michael Schurter
f12bfdb193 scheduler: update tests with modern error helper 2019-12-02 20:25:52 -08:00
Michael Schurter
6112ad9f92 scheduler: fix panic when preempting and evicting
Fixes #6787

In ProposedAllocs the proposed alloc slice was being copied while its
contents were not. Since RemoveAllocs nils elements of the proposed
alloc slice and is called twice, it could panic on the second call when
erroneously accessing a nil'd alloc.

The fix is to not copy the proposed alloc slice and pass the slice
returned by the 1st RemoveAllocs call to the 2nd call, thus maintaining
the trimmed length.
2019-12-02 20:22:22 -08:00
Preetha Appan
bead05f05f Fix more tests 2019-06-26 16:30:53 -05:00
Alex Dadgar
895fdb79f1 Merge pull request #4867 from hashicorp/b-deployment-progress-deadline
Blocked evaluation fixes
2018-11-13 10:29:03 -08:00
Alex Dadgar
2c6ea24f3c fix test 2018-11-07 11:59:24 -08:00
Alex Dadgar
0397cbc8d1 Duplicate blocked evals cancelling improved
The old logic for cancelling duplicate blocked evaluations by job id had
the issue where the newer evaluation could have additional node classes
that it is (in)eligible for that we would not capture. This could make
it such that cluster state could change such that the job would make
progress but no evaluation was unblocked.
2018-11-07 10:08:23 -08: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
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
260b566c91 server 2018-09-15 16:23:13 -07:00
Alex Dadgar
98c7abe541 Tests only use testlog package logger 2018-06-13 15:40:56 -07:00
Alex Dadgar
f6fbb36054 sync 2017-10-13 14:36:02 -07: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
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Alex Dadgar
ac1539d5d9 Sync namespace changes 2017-09-07 17:04:21 -07:00
Alex Dadgar
741a71e0b3 Fix tests 2017-05-01 13:54:26 -07:00
Diptanu Choudhury
230a59ca16 Fixed some more tests 2016-07-25 17:26:38 -07:00
Alex Dadgar
8b55fd6b70 Only interpret vars wrapped in braces 2016-02-04 17:26:46 -08:00
Alex Dadgar
65b8b5295c Remove running, system scheduler, and fix tg overriding eligibility 2016-01-31 20:56:52 -08:00
Alex Dadgar
1797f0e67a Make computed node class a string and add versioning 2016-01-31 18:04:45 -08:00
Alex Dadgar
672f877d8c Schedulers create blocked eval if there are failed allocations 2016-01-31 18:04:45 -08:00
Alex Dadgar
49238770c6 EvalEligibility unit tests and simplify escaped constraint tracking 2016-01-26 17:34:41 -08:00
Alex Dadgar
bc13dcaf48 merge 2015-12-16 15:01:15 -08:00
Alex Dadgar
17bc13bfe5 Add garbage collection to jobs 2015-12-16 15:00:45 -08:00
Armon Dadgar
b42db2fff1 scheduler: adding regexp and version constraint cache 2015-10-12 20:15:07 -07:00
Armon Dadgar
8a02dbc481 Use a single implementation of GenerateUUID 2015-09-07 15:23:03 -07:00
Armon Dadgar
c27a0725cc nomad: cleanup API descrepencies 2015-09-06 20:47:42 -07:00
Armon Dadgar
69a3076d87 scheduler: updating for new APIs 2015-08-25 17:06:06 -07:00
Armon Dadgar
1197dfeb33 scheduler: move proposed alloc logic to Context 2015-08-16 10:28:58 -07:00
Armon Dadgar
f1f7a83093 scheduler: testing bin pack scoring 2015-08-13 13:08:15 -07:00
Armon Dadgar
96228795fe scheduler: working on bin pack 2015-08-13 11:54:59 -07:00
Armon Dadgar
3e8117e91c scheduler: Adding State to Context 2015-08-13 11:33:58 -07:00