Commit Graph

33 Commits

Author SHA1 Message Date
Luiz Aoqui
8a427a470a scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05: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
Michael Schurter
75d6d4ec5e core: add semver constraint
The existing version constraint uses logic optimized for package
managers, not schedulers, when checking prereleases:

- 1.3.0-beta1 will *not* satisfy ">= 0.6.1"
- 1.7.0-rc1 will *not* satisfy ">= 1.6.0-beta1"

This is due to package managers wishing to favor final releases over
prereleases.

In a scheduler versions more often represent the earliest release all
required features/APIs are available in a system. Whether the constraint
or the version being evaluated are prereleases has no impact on
ordering.

This commit adds a new constraint - `semver` - which will use Semver
v2.0 ordering when evaluating constraints. Given the above examples:

- 1.3.0-beta1 satisfies ">= 0.6.1" using `semver`
- 1.7.0-rc1 satisfies ">= 1.6.0-beta1" using `semver`

Since existing jobspecs may rely on the old behavior, a new constraint
was added and the implicit Consul Connect and Vault constraints were
updated to use it.
2019-11-19 08:40:19 -08:00
Preetha Appan
913427428a Remove compat code associated with many previous versions of nomad
This removes compat code for namespaces (0.7), Drain(0.8) and other
older features from releases older than Nomad 0.7
2019-06-25 19:05:25 -05:00
Alex Dadgar
95297c608c goimports 2019-01-22 15:44:31 -08: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
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
655689a743 Preempted allocations should be removed from proposed allocations 2018-10-30 11:06:32 -05:00
Alex Dadgar
260b566c91 server 2018-09-15 16:23:13 -07:00
Preetha Appan
00924555a8 Implement affinity support in generic scheduler 2018-09-04 16:10:11 -05:00
Alex Dadgar
f6fbb36054 sync 2017-10-13 14:36:02 -07:00
Alex Dadgar
5b75b29af4 Nomad builds 2017-02-07 20:31:23 -08:00
Diptanu Choudhury
a6e0077f72 Implemented SetPrefferingNodes in stack 2016-08-30 16:17:50 -07:00
Diptanu Choudhury
e331186ee0 Introducing shared resources in alloc 2016-08-29 13:49:25 -07:00
Diptanu Choudhury
c9d35e4050 Changing implementation of AllocsFit 2016-08-26 17:28:29 -05:00
Sean Chittenden
29be52f762 Speling police 2016-05-15 09:41:34 -07:00
Alex Dadgar
bffcf5bd9f ProposedAllocs dedups in-place updated allocations 2016-03-21 18:09:32 -07:00
Armon Dadgar
bc9423e61b scheduler: Use AllocsByNodeTerminal to avoid filtering 2016-02-20 11:29:15 -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
450252f8ae Respond to comments 2016-01-26 16:43:42 -08:00
Alex Dadgar
a90c1273ed EvalEligibility in context 2016-01-26 15:16:43 -08:00
Armon Dadgar
b42db2fff1 scheduler: adding regexp and version constraint cache 2015-10-12 20:15:07 -07:00
Armon Dadgar
69a3076d87 scheduler: updating for new APIs 2015-08-25 17:06:06 -07:00
Armon Dadgar
9b4f3a4c8f nomad: adding evicted state for allocs 2015-08-22 18:30:49 -07:00
Armon Dadgar
1197dfeb33 scheduler: move proposed alloc logic to Context 2015-08-16 10:28:58 -07:00
Armon Dadgar
fde32cc6ca scheduler: integrate metrics to context 2015-08-13 18:34:04 -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
Armon Dadgar
acb8370d0c scheduler: testing more iterators 2015-08-13 10:13:11 -07:00
Armon Dadgar
6ecf43bdee scheduler: testing select iterators 2015-08-13 10:05:54 -07:00