Preetha Appan
0494a098ce
More style and readablity fixes from review
2018-10-30 11:06:32 -05:00
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
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
bac5cb1e8b
Scheduler uses allocated resources
2018-10-02 17:08:25 -07:00
Preetha Appan
a10118c461
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
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
3c19d01d7a
server
2018-09-15 16:23:13 -07: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
Alex Dadgar
e1c239daae
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
6b6777359b
scheduler: fix missing err assignment
2018-07-11 14:27:10 -04:00
Nick Ethier
5f6def5b04
scheduler: better error handling
2018-07-05 11:00:03 -04:00
Nick Ethier
030e650e78
scheduler: fix nil pointer exception
2018-07-02 16:05:38 -04:00
Alex Dadgar
c3c79c408e
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
Alex Dadgar
f95ab4ade8
Mark canaries on creation, and unmark on promotion
2018-05-07 14:50:01 -05:00
Preetha Appan
a569d34f25
Add custom status description for rescheduling follow up evals, and make unit test robust
2018-04-10 15:30:15 -05:00
Alex Dadgar
e5b5803265
Only mark allocs as part of deployment if deployment is active
2018-04-05 15:40:49 -07:00
Preetha Appan
00537c739b
Fixes edge cases around timing and task finish time being set more than once
2018-04-03 16:34:59 -05:00
Alex Dadgar
9d60e2cebf
Correct status desc on draining system allocs
2018-03-26 17:54:46 -07:00
Alex Dadgar
e106da84de
name and test
2018-03-26 11:06:21 -07:00
Alex Dadgar
e2a6e64fca
Don't create unnecessary deployments
2018-03-23 16:55:21 -07:00
Alex Dadgar
92b636dd32
Fix deadline handling
2018-03-21 16:51:44 -07:00
Michael Schurter
c0542474db
drain: initial drainv2 structs and impl
2018-03-21 16:49:48 -07:00
Preetha Appan
3e96c6c4e0
Address more code review feedback
2018-03-14 16:10:32 -05:00
Preetha Appan
9fed0d2103
Get reschedule policy from the alloc directly
2018-03-14 16:10:32 -05:00
Preetha Appan
e89bbf7289
Update comment about WaitTime
2018-03-14 16:10:32 -05:00
Preetha Appan
47e0280d96
More small review feedback
2018-03-14 16:10:32 -05:00
Preetha Appan
5373ade731
Scheduler and Reconciler changes to support delayed rescheduling
2018-03-14 16:10:32 -05:00
Preetha Appan
2ed4de7e7b
Track previous node id correctly, plus unit test
2018-01-31 09:58:05 -06:00
Preetha Appan
ea4a889e28
Address more code review feedback
2018-01-31 09:56:53 -06:00
Preetha Appan
bd89d2b39e
Make sure that reschedule trackers are not added for node drain replacements
2018-01-31 09:56:53 -06:00
Preetha Appan
21b7b79d5d
Add helper methods, use require and other code review feedback
2018-01-31 09:56:53 -06:00
Preetha Appan
d0f9d59abb
Reconile with changes to structs for reschedule tracking
2018-01-31 09:56:53 -06:00
Preetha Appan
fbb1936dee
Fix some comments and lint warnings, remove unused method
2018-01-31 09:56:53 -06:00
Preetha Appan
031c566ada
Reschedule previous allocs and track their reschedule attempts
2018-01-31 09:56:53 -06:00
Preetha Appan
3b4d7ac2a3
Fix some typos
2017-12-14 13:29:27 -06:00
Alex Dadgar
c1cc51dbee
sync
2017-10-13 14:36:02 -07:00
Michael Schurter
a66c53d45a
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
3904bde9a3
Fix batch handling of complete allocs/node drains
...
This PR fixes:
* An issue in which a node-drain that contains a complete batch alloc
would cause a replacement
* An issue in which allocations with the same name during a scale
down/stop event wouldn't be properly stopped.
* An issue in which batch allocations from previous job versions may not
have been stopped properly.
Fixes https://github.com/hashicorp/nomad/issues/3210
2017-09-14 15:08:57 -07:00
Alex Dadgar
84d06f6abe
Sync namespace changes
2017-09-07 17:04:21 -07:00
Alex Dadgar
184bfd4836
Better comment
2017-07-20 12:31:08 -07:00
Alex Dadgar
248315a2d9
Handle destructive changes before placements
...
This PR updates the generic scheduler to handle destructive changes
before handling placements. This is important because the destructive
change may be due to a lowering of resources. If this is the case, the
handling of the destructive changes first may make it possible for the
placement to happen.
To reason about this imagine there is one node with CPU = 500.
If the group originally had:
* `count = 1`
* `cpu = 400`
And then the job was updated such that the group had:
* `count = 4`
* `cpu = 120`
If the original alloc isn't discounted first, nothing would be able to
place.
2017-07-20 12:24:27 -07:00
Alex Dadgar
641e178416
Stop before trying to place
2017-07-17 17:18:12 -07:00
Alex Dadgar
66a90326e1
Treat destructive updates atomically
2017-07-16 10:35:38 -07:00
Alex Dadgar
f86760db3c
Basic logs
2017-07-07 16:49:08 -07:00
Alex Dadgar
20005f925a
Rolling node drains using max_parallel and stagger
...
This PR adds rolling node drains done at max_parallel and stagger of the
update spec. It brings it inline with old behavior.
2017-07-07 12:12:48 -07:00
Alex Dadgar
d352d85bb9
Test scheduler's handling of canaries/inplace updates
2017-07-07 12:10:04 -07:00
Alex Dadgar
e229d3650b
Attach eval id
2017-07-07 12:10:04 -07:00
Alex Dadgar
af1935e1e1
Mark complete
2017-07-07 12:10:04 -07:00
Alex Dadgar
8424a3b380
Change canary handling
2017-07-07 12:10:04 -07:00
Alex Dadgar
09dfa2fc10
Rename CreateDeployments and remove cancelling behavior in state_store
2017-07-07 12:10:04 -07:00
Alex Dadgar
067ed86a47
Client watches for allocation health using task state and Consul checks
...
This PR adds watching of allocation health at the client. The client can
watch for health based on the tasks running on time and also based on
the consul checks passing.
2017-07-07 12:10:04 -07:00
Alex Dadgar
27a6e6b6d1
update description of the alloc update factory function
2017-07-07 12:03:11 -07:00
Alex Dadgar
b2573b01f9
Fix canary handling
2017-07-07 12:03:11 -07:00
Alex Dadgar
d111dd5c10
Pull out in-place updating into a passed in function; reduce inputs to reconciler
2017-07-07 12:03:11 -07:00
Alex Dadgar
4c123500ee
Remove old
2017-07-07 12:03:11 -07:00
Alex Dadgar
cf5baba808
handle annotations
2017-07-07 12:03:11 -07:00
Alex Dadgar
07b1c3e5db
Only upsert a job if the spec changes and push deployment creation into reconciler
2017-07-07 12:03:11 -07:00
Alex Dadgar
0d42b5d421
initial reconciler
2017-07-07 12:01:17 -07:00
Alex Dadgar
b3f4db0930
cancel deployments
2017-07-07 12:01:17 -07:00
Alex Dadgar
5a2449d236
Respond to review comments
2017-04-19 10:54:03 -07:00
Alex Dadgar
3145086a42
non-purge deregisters
2017-04-15 17:08:05 -07:00
Alex Dadgar
b69b357c7f
Nomad builds
2017-02-07 20:31:23 -08:00
Diptanu Choudhury
5191b4d33a
Making the status command return the allocs of currently registered job
2016-11-24 16:31:30 +01:00
Diptanu Choudhury
dae7f88118
Not setting a drained node as preferred node ( #1740 )
2016-09-23 21:15:50 -07:00
Diptanu Choudhury
1b3c5e98c8
Renaming LocalDisk to EphemeralDisk ( #1710 )
...
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Diptanu Choudhury
52e9946da9
Implemented SetPrefferingNodes in stack
2016-08-30 16:17:50 -07:00
Diptanu Choudhury
bfee7b30a3
Introducing shared resources in alloc
2016-08-29 13:49:25 -07:00
Diptanu Choudhury
13497913f9
Ensuring resources are re-calculated properly in fsm
2016-08-26 20:13:11 -07:00
Diptanu Choudhury
3447658bba
Added scheduler tests to ensure disk constraints are honored
2016-08-25 15:31:56 -05:00
Diptanu Choudhury
1de89776d7
Marking an allocation chained if we are creating this to replace an old one
2016-08-15 17:52:41 -07:00
Diptanu Choudhury
13bab5b1ad
Added scheduler tests
2016-08-09 14:52:25 -07:00
Diptanu Choudhury
ab94c8eed9
Marking allocations which are not terminal and are on down nodes as lost
2016-08-09 13:11:58 -07:00
Alex Dadgar
ac3328e812
Make scheduler mark allocations as lost
2016-08-03 15:57:46 -07:00
Alex Dadgar
e661c09898
fix filter logic
2016-07-28 15:57:56 -07:00
Alex Dadgar
ddbd9261c1
Merge pull request #1471 from hashicorp/b-handle-old-batch-allocs
...
filterCompleteAllocs filters replaced batch allocs
2016-07-28 14:31:19 -07:00
Diptanu Choudhury
48eda99dd9
Setting the queued count as zero if there is nothing to place
2016-07-28 12:13:35 -07:00
Alex Dadgar
c132952ba2
filterCompleteAllocs filters replaced batch allocs
2016-07-27 11:54:55 -07:00
Diptanu Choudhury
d1a6bdb4ba
Making the queued allocations bind late
2016-07-25 22:11:11 -07:00
Diptanu Choudhury
51cb201a09
Initializing the queued allocations late
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
8f0d2a2775
Fixed some more tests
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
dabb83063b
Review comments
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
a64785417d
Fixed the logic for decrementing the count of queued based on plan result
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
1cc0bc392b
Setting the number of queued allocations per task group
2016-07-25 17:26:38 -07:00
Diptanu Choudhury
487c66b84d
Removing the queued state of Job Summary and alloc desired status false
2016-07-13 13:20:46 -06:00
Alex Dadgar
67c0816726
Handle max plans
2016-06-20 17:43:02 -07:00
Sean Chittenden
2f036231e5
Merge pull request #1201 from hashicorp/f-dyn-server-list
...
Dynamic Server Lists/Client Bootstrapping via consul.
2016-06-11 18:58:25 -04:00
Alex Dadgar
b064b392fc
Only unblock if missed class was added after eval snapshot index
2016-06-10 15:24:06 -07:00
Sean Chittenden
95c9d1a63e
Per-comment, remove structs.Allocation's Services attribute.
...
Nuke PopulateServiceIDs() now that it's also no longer needed.
2016-06-10 15:54:39 -04:00
Alex Dadgar
57770de1fc
Add eval-status and remove eval-monitor
2016-05-27 11:50:15 -07:00
Alex Dadgar
fb8d79a908
Blocked evals don't store TG alloc metrics
2016-05-27 11:26:14 -07:00
Alex Dadgar
3fd51ecece
Periodically unblock failed evaluations
2016-05-24 20:10:56 -07:00
Alex Dadgar
18d9e89065
Reuse the same evaluation and reblock it until there is no more work to do
2016-05-24 20:10:56 -07:00
Alex Dadgar
3cbb89c61e
Merge pull request #1188 from hashicorp/f-no-failed-allocs
...
Failed Allocation Metrics stored in Evaluation
2016-05-24 20:06:28 -07:00
Alex Dadgar
fcc57fbc66
rename SpawnedBlockedEval and simplify map safety check
2016-05-24 18:12:59 -07:00
Alex Dadgar
b5ad18a7ea
Dont restart successfully finished batch allocations
2016-05-24 17:23:18 -07:00
Alex Dadgar
1feb57b047
Evals track blocked evals they create
2016-05-19 13:09:52 -07:00
Alex Dadgar
8f5f12ae81
Scheduler no longer produces failed allocations; failed alloc metrics stored in evaluation
2016-05-18 18:11:40 -07:00
Alex Dadgar
117b926e2b
inplaceUpdate returns the allocs that were updated in-place
2016-05-17 15:37:37 -07:00
Alex Dadgar
ab0b57a9a1
Initial plan endpoint implementation - WIP
2016-05-05 11:21:58 -07:00