open-nomad/scheduler
hc-github-team-nomad-core 90cb544835
scheduler: ensure dup alloc names are fixed before plan submit. (#18873) (#18891)
This change fixes a bug within the generic scheduler which meant
duplicate alloc indexes (names) could be submitted to the plan
applier and written to state. The bug originates from the
placements calculation notion that names of allocations being
replaced are blindly copied to their replacement. This is not
correct in all cases, particularly when dealing with canaries.

The fix updates the alloc name index tracker to include minor
duplicate tracking. This can be used when computing placements to
ensure duplicate are found, and a new name picked before the plan
is submitted. The name index tracking is now passed from the
reconciler to the generic scheduler via the results, so this does
not have to be regenerated, or another data structure used.

Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2023-10-27 17:04:04 +01:00
..
benchmarks api: enable support for setting original job source (#16763) 2023-04-11 08:45:08 -05:00
annotate.go logs: fix missing allocation logs after update to Nomad 1.5.4 (#17087) 2023-05-04 16:01:18 -04:00
annotate_test.go logs: fix missing allocation logs after update to Nomad 1.5.4 (#17087) 2023-05-04 16:01:18 -04:00
context.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
context_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
device.go scheduler: filter device instance IDs by constraints (#18141) 2023-08-03 14:58:51 -04:00
device_test.go scheduler: filter device instance IDs by constraints (#18141) 2023-08-03 14:58:51 -04:00
feasible.go backport of commit 0ccf942b26f8c47582f18f324114d02d0bb03a43 (#18684) 2023-10-06 12:19:52 -04:00
feasible_test.go node pools: support `node.pool` constraint in scheduler (#17548) 2023-06-16 13:31:46 -04:00
generic_sched.go scheduler: ensure dup alloc names are fixed before plan submit. (#18873) (#18891) 2023-10-27 17:04:04 +01:00
generic_sched_test.go scheduler: ensure dup alloc names are fixed before plan submit. (#18873) (#18891) 2023-10-27 17:04:04 +01:00
preemption.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
preemption_test.go node pools: apply node pool scheduler configuration (#17598) 2023-06-21 20:31:50 -04:00
propertyset.go update go1.21 (#18184) 2023-08-15 14:40:33 +02:00
rank.go node pools: apply node pool scheduler configuration (#17598) 2023-06-21 20:31:50 -04:00
rank_test.go node pools: apply node pool scheduler configuration (#17598) 2023-06-21 20:31:50 -04:00
reconcile.go scheduler: ensure dup alloc names are fixed before plan submit. (#18873) (#18891) 2023-10-27 17:04:04 +01:00
reconcile_test.go backport of commit e8efe2d251bf3628f13c7eb3ce2422eb7e5b85f6 (#18884) 2023-10-27 17:20:53 +02:00
reconcile_util.go scheduler: ensure dup alloc names are fixed before plan submit. (#18873) (#18891) 2023-10-27 17:04:04 +01:00
reconcile_util_test.go scheduler: ensure dup alloc names are fixed before plan submit. (#18873) (#18891) 2023-10-27 17:04:04 +01:00
scheduler.go node pools: apply node pool scheduler configuration (#17598) 2023-06-21 20:31:50 -04:00
scheduler_oss.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
scheduler_sysbatch_test.go node pools: implement support in scheduler (#17443) 2023-06-07 10:39:03 -04:00
scheduler_system.go node pools: apply node pool scheduler configuration (#17598) 2023-06-21 20:31:50 -04:00
scheduler_system_test.go node pools: implement support in scheduler (#17443) 2023-06-07 10:39:03 -04:00
scheduler_test.go node pools: apply node pool scheduler configuration (#17598) 2023-06-21 20:31:50 -04:00
select.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
select_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
spread.go scheduler: count implicit spread targets as a single target (#17195) 2023-05-17 10:25:00 -04:00
spread_test.go scheduler: count implicit spread targets as a single target (#17195) 2023-05-17 10:25:00 -04:00
stack.go backport of commit 0ccf942b26f8c47582f18f324114d02d0bb03a43 (#18684) 2023-10-06 12:19:52 -04:00
stack_oss.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
stack_test.go backport of commit 0ccf942b26f8c47582f18f324114d02d0bb03a43 (#18684) 2023-10-06 12:19:52 -04:00
system_util.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
system_util_test.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
testing.go [COMPLIANCE] Add Copyright and License Headers 2023-04-10 15:36:59 +00:00
util.go scheduler: fix panic in `render_templates` destructive update check (#18100) 2023-07-31 11:53:30 -04:00
util_test.go Backport of feature: Add new field render_templates on restart block into release/1.6.x (#18094) 2023-07-28 13:54:00 -05:00