Commit graph

85 commits

Author SHA1 Message Date
Mahmood Ali 392f5bac44 Stop updating allocs.Job on stopping or preemption 2019-06-10 18:30:20 -04:00
Michael Schurter a8fc50cc1b nomad: revert use of SnapshotAfter in planApply
Revert plan_apply.go changes from #5411

Since non-Command Raft messages do not update the StateStore index,
SnapshotAfter may unnecessarily block and needlessly fail in idle
clusters where the last Raft message is a non-Command message.

This is trivially reproducible with the dev agent and a job that has 2
tasks, 1 of which fails.

The correct logic would be to SnapshotAfter the previous plan's index to
ensure consistency. New clusters or newly elected leaders will not have
a previous plan, so the index the leader was elected should be used
instead.
2019-06-03 15:34:21 -07:00
Michael Schurter b80a7e0feb nomad: wait for state store to sync in plan apply
Wait for state store to catch up with raft when applying plans.
2019-05-17 14:37:12 -07:00
Arshneet Singh d4e7a5c005 Add comments to functions, and use require instead of assert 2019-04-23 09:57:21 -07:00
Arshneet Singh 0dd4c109e8 Compat tags 2019-04-23 09:18:01 -07:00
Arshneet Singh b977748a4b Add code for plan normalization 2019-04-23 09:18:01 -07:00
Alex Dadgar 4bdccab550 goimports 2019-01-22 15:44:31 -08:00
Alex Dadgar e3cbb2c82e allocs fit checks if devices get oversubscribed 2018-11-07 10:33:22 -08:00
Preetha Appan c33469157d
unit test plan apply with preemptions 2018-11-01 20:06:32 -05:00
Preetha Appan 1415032c13
More review comments 2018-10-30 11:06:32 -05:00
Preetha Appan 3190a2c29b
Fix linting 2018-10-30 11:06:32 -05:00
Preetha Appan 9e4a35fff0
Fix comment 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 3c19d01d7a server 2018-09-15 16:23:13 -07:00
Michael Schurter c0542474db drain: initial drainv2 structs and impl 2018-03-21 16:49:48 -07:00
Josh Soref 6aa0a05998 spelling: scheduling 2018-03-11 18:53:11 +00:00
Josh Soref 7da15e6ee5 spelling: minimum 2018-03-11 18:26:53 +00:00
Josh Soref a0452dd7f5 spelling: evaluate 2018-03-11 18:01:29 +00:00
Preetha Appan 2567b51c58
Edge trigger evaluation when allocations client status is failed 2018-01-31 09:56:53 -06:00
Preetha Appan 3c36abfe14
Update eval modify index as part of plan apply. 2017-12-18 10:03:55 -06:00
Preetha Appan d340c3adb1 Always set modify time on allocations, and other changes addressing review comments 2017-11-01 15:13:48 -05:00
Preetha Appan 39d70be009 Add ModifyTime to Allocation and update it both on plan applies and client initiated updates 2017-11-01 15:13:48 -05:00
Alex Dadgar c1cc51dbee sync 2017-10-13 14:36:02 -07:00
Alex Dadgar 4173834231 Enable more linters 2017-09-26 15:26:33 -07:00
Alex Dadgar f91312a49a Fix typo 2017-07-14 09:53:46 -07:00
Alex Dadgar 7a74080079 Log reason a plan gets rejected per node.
This PR adds a log explaining why a plan gets rejected. Should help
debugging.
2017-07-13 17:14:02 -07:00
Alex Dadgar 952a22fb02 plan apply tests 2017-07-07 12:10:04 -07:00
Alex Dadgar 477c713df5 Plan apply handles canaries and success is set via update 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 b3f4db0930 cancel deployments 2017-07-07 12:01:17 -07:00
Alex Dadgar 83f5e65aae Plan allows updating the status of deployments 2017-05-11 12:49:04 -07:00
Alex Dadgar 7078d563cb Create Deployments through plan application 2017-05-05 15:33:19 -07:00
Alex Dadgar b67c40f717 Proper denormalization in optimistic state store 2017-05-01 14:49:57 -07:00
Alex Dadgar c261fe324e Fix a panic during plan evaluation
This PR fixes a potential source of a panic while evaluating a plan with
all_at_once set to true with partial failures.

Fixes #2531
2017-04-10 14:56:21 -07:00
Alex Dadgar b69b357c7f Nomad builds 2017-02-07 20:31:23 -08: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 330aec45b9 Remove outstanding reset from plan applier 2016-03-04 17:25:37 -08:00
Armon Dadgar 6a883e1389 nomad: do not skip node plan if we receive an evaluation result 2016-02-22 22:32:02 -08:00
Alex Dadgar 88ddfbed31 Revert "Debug messages around the plan and plan response"
This reverts commit 7646657e6b8a892210779eaf5708341b94b29b24.
2016-02-22 22:24:52 -08:00
Alex Dadgar 64cabb5a97 Revert "Debug log in plan apply"
This reverts commit 532df0d27e02e0cb30b6e3a28b9c4b5778bd71b3.
2016-02-22 22:24:27 -08:00
Alex Dadgar c2242552a1 Debug messages around the plan and plan response 2016-02-22 20:36:11 -08:00
Alex Dadgar b72b3ce190 Debug log in plan apply 2016-02-22 16:12:16 -08:00
Alex Dadgar 0b65fb410a add debug error if there is a partial apply and refresh index isn't set 2016-02-22 13:03:40 -08:00
Armon Dadgar fd5d7906f4 nomad: cleanup handling of refresh index 2016-02-22 11:43:41 -08:00
Armon Dadgar e4524b173c Address review feedback 2016-02-21 13:32:45 -08:00
Armon Dadgar 0e24df554e nomad: allow for job normalization 2016-02-21 11:42:54 -08:00
Armon Dadgar 3746bf7cd3 nomad: use CPU count to determine pool size 2016-02-20 13:42:13 -08:00
Armon Dadgar d69b8d055b nomad: extra comment 2016-02-20 13:41:49 -08:00
Armon Dadgar 813b02c8b4 nomad: plan apply uses the EvaluatePool 2016-02-20 13:12:14 -08:00
Armon Dadgar 2d7236eb95 nomad: Use AllocsByNodeTerminal in plan apply 2016-02-20 11:26:38 -08:00