Commit Graph

422 Commits

Author SHA1 Message Date
Alex Dadgar ce2319be9b cleanup limit detection 2017-07-07 12:03:11 -07:00
Alex Dadgar b2573b01f9 Fix canary handling 2017-07-07 12:03:11 -07:00
Alex Dadgar 7952240d69 Deployment tests 2017-07-07 12:03:11 -07:00
Alex Dadgar ce55559f12 Non-Canary/Deployment Tests 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 c77944ed29 assign names 2017-07-07 12:03:11 -07:00
Alex Dadgar ecacd44888 handle batch filtering 2017-07-07 12:03:11 -07:00
Alex Dadgar 4c123500ee Remove old 2017-07-07 12:03:11 -07:00
Alex Dadgar 270e26c600 Populate desired state per tg 2017-07-07 12:03:11 -07:00
Alex Dadgar 23dcd175ef Show canaries on plan 2017-07-07 12:03:11 -07:00
Alex Dadgar cf5baba808 handle annotations 2017-07-07 12:03:11 -07:00
Alex Dadgar a46f7c3eb8 Todos 2017-07-07 12:03:11 -07:00
Alex Dadgar 00d962b8b5 Some comments and cleanup 2017-07-07 12:03:11 -07:00
Alex Dadgar 994ad285b7 Split reconcile file 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 8169590d76 Fix tests 2017-05-01 13:54:26 -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 2c31d4036b Skip inplace update on terminal batch allocation
This PR skips adding an inplace update to a successfully terminal batch
job to the plan. This avoids extra data in the plan and avoids
triggering updates on all clients that have the terminal allocation.
This is matching behavior of the service scheduler.

/cc @armon for review
2017-03-11 17:19:22 -08:00
Alex Dadgar bb12ff69a6 Fix in-place update 2017-03-09 22:03:10 -08:00
Alex Dadgar 601cbd7784 Feedback addressed 2017-03-09 21:36:27 -08:00
Alex Dadgar b65d248dee Fix filtering issue and add a test that would catch it 2017-03-09 16:20:39 -08:00
Alex Dadgar 7945e4564c Refactor 2017-03-09 15:26:46 -08:00
Alex Dadgar 60c42f745a Split distinct property and host iterator and add iterator to system stack 2017-03-08 19:00:10 -08:00
Alex Dadgar 319b24081f cleanup 2017-03-08 17:57:31 -08:00
Alex Dadgar a439bf709d Property Set 2017-03-08 17:50:40 -08:00
Alex Dadgar d83a8fe9f2 Unoptimized implementation + testing 2017-03-07 14:48:54 -08:00
Alex Dadgar 87d971a6b8 Double the anti-affinity for placing same task group on node 2017-03-06 11:52:53 -08:00
Alex Dadgar 5be806a3df Fix vet script and fix vet problems
This PR fixes our vet script and fixes all the missed vet changes.

It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Alex Dadgar 04862ca10e Tests compile 2017-02-07 21:30:57 -08:00
Alex Dadgar b69b357c7f Nomad builds 2017-02-07 20:31:23 -08:00
Alex Dadgar 302a0cf382 Fix adjust test 2017-01-08 14:14:35 -08:00
Alex Dadgar 2c838a80f6 Detect newly created allocation's properly 2017-01-08 13:55:03 -08:00
Alex Dadgar 8d5f0fea69 Merge pull request #2128 from hashicorp/f-dispatch
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Diptanu Choudhury 9cdd576720 Updated changelog and fixed tests 2016-12-20 11:32:17 -08:00
Alex Dadgar a1dd78c24b Scheduler combines meta from job > group > task 2016-12-15 17:08:38 -08:00
Diptanu Choudhury 5191b4d33a Making the status command return the allocs of currently registered job 2016-11-24 16:31:30 +01:00
Alex Dadgar a1d08c2aba Add scheduler version enforcement 2016-10-26 14:52:48 -07:00
Alex Dadgar 989827e402 Add set contains 2016-10-19 13:06:28 -07:00
Alex Dadgar 36cfe6e89e Large refactor of task runner and Vault token rehandling 2016-10-18 11:24:20 -07:00
Ben Barnard 83f647ed84 Replace "the the" with "the" in documentation and comments 2016-10-11 15:31:40 -04:00
Diptanu Choudhury dae7f88118 Not setting a drained node as preferred node (#1740) 2016-09-23 21:15:50 -07:00
Diptanu Choudhury 45afc0b4e1 Added logic to ensure scheduler knows job defn has been updated when ephemeral disks has been updated (#1725) 2016-09-21 14:00:02 -07:00
Alex Dadgar bc500a536c tasks updated 2016-09-21 11:31:09 -07:00
Diptanu Choudhury 36edabb487 Fixed the logic of calculating queued allocation in sys sched (#1724) 2016-09-20 12:05:19 -07:00
Alex Dadgar 683380c25c Merge pull request #1715 from hashicorp/b-dead-system-nodes
Fix bug where dead nodes weren't properly handled by system scheduler
2016-09-19 11:49:44 -07:00
Alex Dadgar 47551e93b4 Fix bug in which dead nodes weren't being properly handled by system scheduler 2016-09-19 11:49:27 -07:00
Diptanu Choudhury 1b3c5e98c8 Renaming LocalDisk to EphemeralDisk (#1710)
Renaming LocalDisk to EphemeralDisk
2016-09-14 15:43:42 -07:00
Diptanu Choudhury d94bb45ad3 Added some more comments 2016-08-31 14:06:31 -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 e79cb67391 Changing implementation of AllocsFit 2016-08-26 17:28:29 -05:00
Diptanu Choudhury 3447658bba Added scheduler tests to ensure disk constraints are honored 2016-08-25 15:31:56 -05:00
Diptanu Choudhury ffaf6c6299 Fixed some tests 2016-08-25 13:56:39 -05:00
Diptanu Choudhury ec73c768f1 Making the scheduler use LocalDisk instead of Resources.DiskMB 2016-08-25 12:27:42 -05:00
Diptanu Choudhury c1a455983d Added the chained alloc for system scheduler 2016-08-16 10:49:45 -07: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
Alex Dadgar 64f7eff612 Plan on system scheduler doesn't count nodes who don't meet constraints 2016-08-11 15:26:25 -07:00
Diptanu Choudhury 23fcb9f5c9 Ensuring system sched doesn't increment queued count when nodes are filtered 2016-08-10 14:33:13 -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 e33bda76bf test sched doesn't mark complete as lost + core_sched tests 2016-08-04 11:24:17 -07:00
Alex Dadgar ac3328e812 Make scheduler mark allocations as lost 2016-08-03 15:57:46 -07:00
Alex Dadgar 3a9f3a31bc KillTimeout can be modified in place 2016-08-01 20:19:12 -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 eb08405467 Updated tests and added logic to system sched 2016-07-28 14:02:50 -07:00
Diptanu Choudhury 2e84d246f9 fixed a comment 2016-07-28 12:22:44 -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
Diptanu Choudhury 4a8636cb61 Added a test 2016-07-27 17:49:53 -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 d1682e052a Added a test for adjustQueuedAllocations 2016-07-25 17:31:40 -07:00
Diptanu Choudhury 51cb201a09 Initializing the queued allocations late 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 09aa867cc2 Added a test to ensure we record the queued allocations correctly when the plan made partial progress 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 4a17d8e6d6 Added a test to ensure failed batch allocations are being added to the number of queued allocations 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 39bcfcd1c6 Added a test to ensure system scheduler records the correct number of queued allocations 2016-07-25 17:26:38 -07:00
Diptanu Choudhury cce5f483ae Added 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 50842b88c7 Fixed some bugs 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 804ef1e932 Not setting the desired and client status of an allocation during in-place updates 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 e90529afc9 test for max plan 2016-06-20 17:56:49 -07:00
Alex Dadgar 67c0816726 Handle max plans 2016-06-20 17:43:02 -07:00
Sean Chittenden a658299235
Misc typos 2016-06-16 16:17:17 -07:00
Alex Dadgar d44c4761f6 track failed allocations properly 2016-06-15 12:58:19 -07:00
Alex Dadgar 8e231fa382 Rename ConsulService back to Service 2016-06-12 16:36:49 -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
Sean Chittenden 7956eb0c80
Rename structs.Task's `Service` attribute to `ConsulService` 2016-06-10 15:54:39 -04:00
Sean Chittenden 4973ec32bb
Rename structs.Services to structs.ConsulServices 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 6a236872b4 address comment 2016-05-25 10:30:47 -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 958d677248 comment 2016-05-24 18:18:10 -07:00
Alex Dadgar fcc57fbc66 rename SpawnedBlockedEval and simplify map safety check 2016-05-24 18:12:59 -07:00
Alex Dadgar 7167b93ba9 Add test to verify drain doesn't restart successful batch and add to ignore list 2016-05-24 17:47:03 -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 a5ab96d40e Merge pull request #1168 from hashicorp/f-plan-endpoint
Job.Plan endpoint
2016-05-16 13:15:40 -07:00
Alex Dadgar a231f6f998 Switch to using the harness 2016-05-16 12:49:18 -07:00
Sean Chittenden dc28ab0cb5
Speling police 2016-05-15 09:41:34 -07:00
Alex Dadgar bed4cb7a9f Fixes 2016-05-13 11:53:11 -07:00
Alex Dadgar 7a44ec5ccc Remove plan from the response 2016-05-12 11:29:38 -07:00
Alex Dadgar 6d69e39966 Test task group update annotations 2016-05-11 16:31:50 -07:00
Alex Dadgar 81f0286dd8 Merge branch 'master' into f-plan-endpoint 2016-05-11 15:39:36 -07:00
Alex Dadgar 24bfaa70ac Fix switching diff structures 2016-05-11 15:36:28 -07:00
Alex Dadgar 8b45e2c474 Check if network asks have changed when checking task updates 2016-05-05 21:32:01 -07:00
Alex Dadgar ab0b57a9a1 Initial plan endpoint implementation - WIP 2016-05-05 11:21:58 -07:00
Alex Dadgar ff0dd9b81c Task is not eligible for update if User, Meta, or Resources change 2016-04-25 17:20:25 -07:00
Alex Dadgar 733156c016 vendor 2016-04-19 17:12:44 -07:00
Alex Dadgar 7dc1a525cb more debug 2016-04-19 16:55:27 -07:00
Alex Dadgar 76e493dc16 base debugging 2016-04-19 16:33:25 -07:00
Alex Dadgar 1a31e5e137 Fix drained/batch allocations from continually migrating 2016-04-12 16:14:32 -07:00
Alex Dadgar f021c1a7b0 filtering failed batch allocs 2016-04-11 12:51:53 -07:00
Alex Dadgar 034bae90bb Revert "Remove client status from allocation TerminalStatus"
This reverts commit 819e1e4b3967c7029ee8221144666ff460fdd7ed.
2016-04-08 14:22:06 -07:00
Alex Dadgar 09f63fd3c0 Remove client status from allocation TerminalStatus 2016-03-25 12:53:37 -07:00
Alex Dadgar b80e61a66c Merge pull request #975 from hashicorp/f-rename-complete-alloc
Successful allocations are marked as complete instead of dead
2016-03-25 10:35:11 -07:00
Diptanu Choudhury 3f0580f204 Added a note about backward compatibility 2016-03-23 19:08:07 -07:00
Alex Dadgar 94522e7bed Successful allocations are marked as complete instead of dead 2016-03-23 18:08:19 -07:00
Alex Dadgar 2de9299cab ProposedAllocs dedups in-place updated allocations 2016-03-21 18:09:32 -07:00
Alex Dadgar f6e220b987 unit-test demonstrating broken behavior 2016-03-21 16:28:47 -07:00
Alex Dadgar 914207a5c2 Allow count zero 2016-03-17 11:02:59 -07:00
Alex Dadgar 7843ed1218 evict and replace when the artifacts of a task change 2016-03-15 19:32:49 -07:00
Alex Dadgar ad92e50a24 Avoid serializes Allocation.Resources 2016-03-01 14:09:25 -08:00
Alex Dadgar 6a368a9f67 Merge pull request #848 from hashicorp/b-server-panic
core: store the job on allocations that are from stopped jobs
2016-02-24 17:27:22 -08:00
Alex Dadgar a2b56a5cff Generic Scheduler handles periodic eval type 2016-02-24 16:20:33 -08:00
Alex Dadgar a9d410dbee Store the job on allocations that are from stopped jobs 2016-02-24 14:50:59 -08:00
Alex Dadgar fa8e2d31ee Revert "err logs in worker and scheduler"
This reverts commit 7befc586521b70eb84013bff367310e4cfa45c27.
2016-02-22 22:23:57 -08:00
Alex Dadgar f48eabe753 err logs in worker and scheduler 2016-02-22 14:47:59 -08:00
Alex Dadgar f092c7ca15 format 2016-02-22 13:24:26 -08:00
Armon Dadgar 2b7bdfee37 nomad: add a sanity check guard 2016-02-22 12:15:40 -08:00
Alex Dadgar e42720c2f5 Fix progressMade in scheduler 2016-02-22 10:38:04 -08:00
Armon Dadgar 87447efa61 schedule: deduplicate the jobs 2016-02-21 11:32:56 -08:00
Armon Dadgar 0dbd4c46c9 nomad: make PopulateServiceIDs more efficient 2016-02-21 11:15:00 -08:00
Alex Dadgar 821b9c13db Merge pull request #823 from hashicorp/f-bitmap
Switch port collision checking to use bitmap instead of map
2016-02-20 16:02:48 -08:00
Armon Dadgar 9784bb7285 nomad: cache bitmaps to avoid GC pressure 2016-02-20 12:18:22 -08:00
Armon Dadgar 35741fcedd scheduler: Use AllocsByNodeTerminal to avoid filtering 2016-02-20 11:29:15 -08:00