Commit Graph

27 Commits

Author SHA1 Message Date
Derek Strickland
6329f44148 disconnected clients: ensure servers meet minimum required version (#12202)
* planner: expose ServerMeetsMinimumVersion via Planner interface
* filterByTainted: add flag indicating disconnect support
* allocReconciler: accept and pass disconnect support flag
* tests: update dependent tests
2022-04-05 17:12:23 -04:00
Luiz Aoqui
8a427a470a scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
Mahmood Ali
122a4cb844 tests: use standard library testing.TB
Glint pulled in an updated version of mitchellh/go-testing-interface
which broke some existing tests because the update added a Parallel()
method to testing.T. This switches to the standard library testing.TB
which doesn't have a Parallel() method.
2021-06-09 16:18:45 -07:00
Drew Bailey
47d1a33eb5 writetxn can return error, add alloc and job generic events. Add events
table for durability
2020-10-14 12:44:39 -04:00
Drew Bailey
8d16846695 Events/deployment events (#9004)
* Node Drain events and Node Events (#8980)

Deployment status updates

handle deployment status updates (paused, failed, resume)

deployment alloc health

generate events from apply plan result

txn err check, slim down deployment event

one ndjson line per index

* consolidate down to node event + type

* fix UpdateDeploymentAllocHealth test invocations

* fix test
2020-10-14 12:44:37 -04:00
Lang Martin
cd6d34425f server: stop after client disconnect (#7939)
* jobspec, api: add stop_after_client_disconnect

* nomad/state/state_store: error message typo

* structs: alloc methods to support stop_after_client_disconnect

1. a global AllocStates to track status changes with timestamps. We
   need this to track the time at which the alloc became lost
   originally.

2. ShouldClientStop() and WaitClientStop() to actually do the math

* scheduler/reconcile_util: delayByStopAfterClientDisconnect

* scheduler/reconcile: use delayByStopAfterClientDisconnect

* scheduler/util: updateNonTerminalAllocsToLost comments

This was setup to only update allocs to lost if the DesiredStatus had
already been set by the scheduler. It seems like the intention was to
update the status from any non-terminal state, and not all lost allocs
have been marked stop or evict by now

* scheduler/testing: AssertEvalStatus just use require

* scheduler/generic_sched: don't create a blocked eval if delayed

* scheduler/generic_sched_test: several scheduling cases
2020-05-13 16:39:04 -04:00
Arshneet Singh
ee268a58db Add comments to functions, and use require instead of assert 2019-04-23 09:57:21 -07:00
Arshneet Singh
97686e371f Remove allowPlanOptimization from schedulers 2019-04-23 09:18:02 -07:00
Arshneet Singh
02b832c3ff Compat tags 2019-04-23 09:18:01 -07:00
Arshneet Singh
f75c6b4bdb Add tests for plan normalization 2019-04-23 09:18:01 -07:00
Arshneet Singh
4eedab18a7 Add code for plan normalization 2019-04-23 09:18:01 -07:00
Alex Dadgar
95297c608c goimports 2019-01-22 15:44:31 -08:00
Preetha Appan
3ad7b3fb5b More review comments 2018-11-01 16:36:11 -05:00
Preetha Appan
21432d69dc More style and readablity fixes from review 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
Alex Dadgar
260b566c91 server 2018-09-15 16:23:13 -07:00
Alex Dadgar
48d637dad1 RPC, FSM, State Store for marking DesiredTransistion
fix build tag
2018-03-21 16:49:48 -07:00
Preetha Appan
f12255e886 Update eval modify index as part of plan apply. 2017-12-18 10:03:55 -06:00
Alex Dadgar
f6fbb36054 sync 2017-10-13 14:36:02 -07:00
Michael Schurter
55bd0c8df7 Use go-testing-interface instead of testing
This drops the testings stdlib pkg from our dependencies. Saves a
whopping 46kb on our binary (was really hoping for more of a win there),
but also avoids potential ugliness with how testing sets flags.
2017-07-25 15:35:19 -07:00
Alex Dadgar
591ef9c9f3 Rename CreateDeployments and remove cancelling behavior in state_store 2017-07-07 12:10:04 -07:00
Alex Dadgar
bb6524151a cancel deployments 2017-07-07 12:01:17 -07:00
Alex Dadgar
5b75b29af4 Nomad builds 2017-02-07 20:31:23 -08:00
Diptanu Choudhury
a6b88d7a50 Marking an allocation chained if we are creating this to replace an old one 2016-08-15 17:52:41 -07:00
Alex Dadgar
08b2291313 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
96ab783b3f Scheduler no longer produces failed allocations; failed alloc metrics stored in evaluation 2016-05-18 18:11:40 -07:00
Alex Dadgar
f56bdbe03a Switch to using the harness 2016-05-16 12:49:18 -07:00