open-nomad/scheduler
Derek Strickland e1f9c442e1
reconciler: refactor `computeGroup` (#12033)
The allocReconciler's computeGroup function contained a significant amount of inline logic that was difficult to understand the intent of. This commit extracts inline logic into the following intention revealing subroutines. It also includes updates to the function internals also aimed at improving maintainability and renames some existing functions for the same purpose. New or renamed functions include.

Renamed functions

- handleGroupCanaries -> cancelUnneededCanaries
- handleDelayedLost -> createLostLaterEvals
- handeDelayedReschedules -> createRescheduleLaterEvals

New functions

- filterAndStopAll
- initializeDeploymentState
- requiresCanaries
- computeCanaries
- computeUnderProvisionedBy
- computeReplacements
- computeDestructiveUpdates
- computeMigrations
- createDeployment
- isDeploymentComplete
2022-02-10 16:24:51 -05:00
..
benchmarks scheduler: tooling for scheduler benchmarking (#11725) 2021-12-22 10:05:44 -05:00
annotate.go scheduler: label loops with nested switch statements for effective break (#8528) 2020-07-24 08:50:41 -04:00
annotate_test.go Deprecate IOPS 2018-12-06 15:09:26 -08:00
context.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
context_test.go scheduler: seed random shuffle nodes with eval ID (#12008) 2022-02-08 12:16:33 -05:00
device.go Change types of weights on spread/affinity 2019-01-30 12:20:38 -08:00
device_test.go Change types of weights on spread/affinity 2019-01-30 12:20:38 -08:00
feasible.go scheduler: seed random shuffle nodes with eval ID (#12008) 2022-02-08 12:16:33 -05:00
feasible_test.go add support for host network interpolation 2021-04-13 09:53:05 -04:00
generic_sched.go reconciler: refactor `computeGroup` (#12033) 2022-02-10 16:24:51 -05:00
generic_sched_test.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
preemption.go Only preempt for network when there is a network 2019-06-07 18:55:55 -04:00
preemption_test.go Fix preemption panic (#11346) 2021-10-19 20:22:03 -04:00
propertyset.go server 2018-09-15 16:23:13 -07:00
rank.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
rank_test.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
reconcile.go reconciler: refactor `computeGroup` (#12033) 2022-02-10 16:24:51 -05:00
reconcile_test.go core: allow setting and propagation of eval priority on job de/registration (#11532) 2021-11-23 09:23:31 +01:00
reconcile_util.go reconciler: refactor `computeGroup` (#12033) 2022-02-10 16:24:51 -05:00
reconcile_util_test.go removed deprecated fields from Drain structs and API 2021-03-21 15:30:11 +00:00
scheduler.go scheduler: seed random shuffle nodes with eval ID (#12008) 2022-02-08 12:16:33 -05:00
scheduler_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
scheduler_sysbatch_test.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
scheduler_system.go scheduler: recover from panic (#12009) 2022-02-07 11:47:53 -05:00
scheduler_system_test.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
select.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
select_test.go Implement affinity support in generic scheduler 2018-09-04 16:10:11 -05:00
spread.go scheduler: prevent panic in spread iterator during alloc stop 2022-02-09 19:53:06 -05:00
spread_test.go scheduler: prevent panic in spread iterator during alloc stop 2022-02-09 19:53:06 -05:00
stack.go scheduler: seed random shuffle nodes with eval ID (#12008) 2022-02-08 12:16:33 -05:00
stack_oss.go chore: ensure consistent file naming for non-enterprise files. 2022-01-13 11:32:16 +01:00
stack_test.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
testing.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
util.go scheduler: seed random shuffle nodes with eval ID (#12008) 2022-02-08 12:16:33 -05:00
util_test.go scheduler: seed random shuffle nodes with eval ID (#12008) 2022-02-08 12:16:33 -05:00