open-nomad/nomad/state
Tim Gross 6bd33d3fb9
CSI: use job status not alloc status for plugin updates from summary (#12027)
When an allocation is updated, the job summary for the associated job
is also updated. CSI uses the job summary to set the expected count
for controller and node plugins. We incorrectly used the allocation's
server status instead of the job status when deciding whether to
update or remove the job from the plugins. This caused a node drain or
other terminal state for an allocation to clear the expected count for
the entire plugin.

Use the job status to guide whether to update or remove the expected
count.

The existing CSI tests for the state store incorrectly modeled the
updates we received from servers vs those we received from clients,
leading to test assertions that passed when they should not.

Rework the tests to clarify each step in the lifecycle and rename CSI state
store functions for clarity
2022-02-09 11:51:49 -05:00
..
autopilot.go
autopilot_test.go
deployment_events_test.go
events.go
events_test.go
iterator.go
paginator.go
paginator_test.go
schema.go
schema_test.go
state_changes.go
state_store.go CSI: use job status not alloc status for plugin updates from summary (#12027) 2022-02-09 11:51:49 -05:00
state_store_oss.go
state_store_restore.go state: move restore functionality into its own file. 2022-01-24 13:03:03 +01:00
state_store_restore_test.go state: move restore functionality into its own file. 2022-01-24 13:03:03 +01:00
state_store_test.go CSI: use job status not alloc status for plugin updates from summary (#12027) 2022-02-09 11:51:49 -05:00
testing.go csi: ensure that PastClaims are populated with correct mode (#11932) 2022-01-27 10:05:41 -05:00