open-nomad/nomad
Tim Gross c67c31e543 csi: ensure that PastClaims are populated with correct mode (#11932)
In the client's `(*csiHook) Postrun()` method, we make an unpublish
RPC that includes a claim in the `CSIVolumeClaimStateUnpublishing`
state and using the mode from the client. But then in the
`(*CSIVolume) Unpublish` RPC handler, we query the volume from the
state store (because we only get an ID from the client). And when we
make the client RPC for the node unpublish step, we use the _current
volume's_ view of the mode. If the volume's mode has been changed
before the old allocations can have their claims released, then we end
up making a CSI RPC that will never succeed.

Why does this code path get the mode from the volume and not the
claim? Because the claim written by the GC job in `(*CoreScheduler)
csiVolumeClaimGC` doesn't have a mode. Instead it just writes a claim
in the unpublishing state to ensure the volumewatcher detects a "past
claim" change and reaps all the claims on the volumes.

Fix this by ensuring that the `CSIVolumeDenormalize` creates past
claims for all nil allocations with a correct access mode set.
2022-01-28 14:43:43 -05:00
..
deploymentwatcher core: allow setting and propagation of eval priority on job de/registration (#11532) 2021-11-23 09:23:31 +01:00
drainer
mock scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
state csi: ensure that PastClaims are populated with correct mode (#11932) 2022-01-28 14:43:43 -05:00
stream events: fix wildcard namespace handling (#10935) 2021-09-02 09:36:55 -07:00
structs Generate files for 1.2.4 release 2022-01-18 23:43:00 +00:00
volumewatcher CSI: resolve invalid claim states (#11890) 2022-01-28 14:43:35 -05:00
acl.go
acl_endpoint.go
acl_endpoint_test.go
acl_test.go
alloc_endpoint.go provide -no-shutdown-delay flag for job/alloc stop (#11596) 2021-12-13 14:54:53 -05:00
alloc_endpoint_test.go
autopilot.go
autopilot_test.go test: fix flaky TestAutopilot_CleanupDeadServer 2021-09-28 16:38:56 -07:00
blocked_evals.go
blocked_evals_stats.go
blocked_evals_stats_test.go
blocked_evals_system.go
blocked_evals_test.go
client_agent_endpoint.go
client_agent_endpoint_test.go debug: Improve namespace and region support (#11269) 2021-10-12 16:58:41 -04:00
client_alloc_endpoint.go
client_alloc_endpoint_test.go
client_csi_endpoint.go
client_csi_endpoint_test.go
client_fs_endpoint.go
client_fs_endpoint_test.go
client_rpc.go
client_rpc_test.go
client_stats_endpoint.go
client_stats_endpoint_test.go
config.go
consul.go
consul_oss_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
consul_policy.go
consul_policy_oss_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
consul_policy_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
consul_test.go
core_sched.go CSI: resolve invalid claim states (#11890) 2022-01-28 14:43:35 -05:00
core_sched_test.go CSI: resolve invalid claim states (#11890) 2022-01-28 14:43:35 -05:00
csi_endpoint.go api: support namespace wildcard in CSI volume list (#11724) 2021-12-21 17:19:45 -05:00
csi_endpoint_test.go api: support namespace wildcard in CSI volume list (#11724) 2021-12-21 17:19:45 -05:00
deployment_endpoint.go api: paginate deployment list and accept wildcard namespace (#11743) 2022-01-03 08:36:02 -05:00
deployment_endpoint_test.go api: paginate deployment list and accept wildcard namespace (#11743) 2022-01-03 08:36:02 -05:00
deployment_watcher_shims.go
drainer_int_test.go
drainer_shims.go
endpoints_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
eval_broker.go Emit metrics for eval waitUntil as nomad.nomad.broker.eval_waiting (#10236) 2022-01-06 15:57:40 -05:00
eval_broker_test.go test: fix fake by increasing time window 2021-09-28 12:22:59 -07:00
eval_endpoint.go api: respect wildcard in evaluations list API (#11710) 2021-12-20 12:23:50 -05:00
eval_endpoint_test.go api: respect wildcard in evaluations list API (#11710) 2021-12-20 12:23:50 -05:00
event_endpoint.go
event_endpoint_test.go
fsm.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
fsm_oss.go chore: ensure consistent file naming for non-enterprise files. 2022-01-13 11:32:16 +01:00
fsm_registry_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
fsm_test.go events: fix wildcard namespace handling (#10935) 2021-09-02 09:36:55 -07:00
heartbeat.go
heartbeat_test.go
job_endpoint.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
job_endpoint_hook_connect.go fix panic when Connect mesh gateway doesn't have a proxy block (#11257) 2021-10-04 15:52:07 -04:00
job_endpoint_hook_connect_test.go fix panic when Connect mesh gateway doesn't have a proxy block (#11257) 2021-10-04 15:52:07 -04:00
job_endpoint_hook_expose_check.go
job_endpoint_hook_expose_check_test.go
job_endpoint_hooks.go
job_endpoint_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
job_endpoint_oss_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
job_endpoint_test.go replace 'a alloc' with 'an alloc' where appropriate (#11792) 2022-01-10 11:59:46 -05:00
leader.go csi: update leader's ACL in volumewatcher (#11891) 2022-01-28 14:43:27 -05:00
leader_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
leader_test.go Make number of scheduler workers reloadable (#11593) 2022-01-06 11:56:13 -05:00
merge.go
namespace_endpoint.go
namespace_endpoint_test.go
node_endpoint.go
node_endpoint_test.go do not initialize copy's slice if nil in original 2021-12-23 16:40:35 -08:00
operator_endpoint.go
operator_endpoint_test.go
periodic.go
periodic_endpoint.go
periodic_endpoint_test.go
periodic_test.go
plan_apply.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
plan_apply_oss.go chore: ensure consistent file naming for non-enterprise files. 2022-01-13 11:32:16 +01:00
plan_apply_pool.go
plan_apply_pool_test.go
plan_apply_test.go
plan_endpoint.go
plan_endpoint_test.go
plan_normalization_test.go allow configuration of Docker hostnames in bridge mode (#11173) 2021-09-16 08:13:09 +02:00
plan_queue.go
plan_queue_test.go
raft_rpc.go
regions_endpoint.go
regions_endpoint_test.go
rpc.go update tests to make an actual RaftRPC 2021-08-27 10:37:30 -04:00
rpc_test.go update tests to make an actual RaftRPC 2021-08-27 10:37:30 -04:00
scaling_endpoint.go chore: fixup inconsistent method receiver names. (#11704) 2021-12-20 11:44:21 +01:00
scaling_endpoint_test.go rpc: fix scaling policy get index response when policy is found. 2021-11-26 10:40:27 +01:00
search_endpoint.go
search_endpoint_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
search_endpoint_test.go
serf.go
serf_test.go
server.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
server_setup_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
server_test.go Make number of scheduler workers reloadable (#11593) 2022-01-06 11:56:13 -05:00
stats_fetcher.go
stats_fetcher_test.go
status_endpoint.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
status_endpoint_test.go
system_endpoint.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
system_endpoint_test.go
testing.go Make number of scheduler workers reloadable (#11593) 2022-01-06 11:56:13 -05:00
testing_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
timetable.go
timetable_test.go
util.go
util_test.go
vault.go vault: set JobID in Vault metadata (#11397) 2021-10-27 07:20:29 -07:00
vault_test.go
vault_testing.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
worker.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00
worker_string_schedulerworkerstatus.go Make number of scheduler workers reloadable (#11593) 2022-01-06 11:56:13 -05:00
worker_string_workerstatus.go Make number of scheduler workers reloadable (#11593) 2022-01-06 11:56:13 -05:00
worker_test.go scheduler: detect and log unexpected scheduling collisions (#11793) 2022-01-14 20:09:14 -05:00