Tim Gross
40241b261b
CSI: ensure only client-terminal allocs are treated as past claims ( #26831 )
...
The volume watcher checks whether any allocations that have claims are terminal
so that it knows if it's safe to unpublish the volume. This check was
considering a claim as unpublishable if the allocation was terminal on either
the server or client, rather than the client alone. In many circumstances this
is safe.
But if an allocation takes a while to stop (ex. it has a `shutdown_delay`), it's
possible for garbage collection to run in the window between when the alloc is
marked server-terminal and when the task is actually stopped. The server
unpublishes the volume which sends a node plugin RPC. The plugin unmounts the
volume while it's in use, and then unmounts it again when the allocation stops
and the CSI postrun hook runs. If the task writes to the volume during the
unmounting process, some providers end up in a broken state and the volume is
not usable unless it's detached and reattached.
Fix this by considering a claim a "past claim" only when the allocation is
client terminal. This way if garbage collection runs while we're waiting for
allocation shutdown, the alloc will only be server-terminal and we won't send
the extra node RPCs.
Fixes: https://github.com/hashicorp/nomad/issues/24130
Fixes: https://github.com/hashicorp/nomad/issues/25819
Ref: https://hashicorp.atlassian.net/browse/NMD-1001
2025-09-25 09:24:53 -04:00
..
2025-08-08 16:07:59 +01:00
2025-07-16 08:46:24 -04:00
2025-07-02 12:43:45 -07:00
2025-07-25 10:44:08 +01:00
2025-09-24 14:20:34 +01:00
2025-01-24 08:00:07 +00:00
2025-09-25 09:24:53 -04:00
2025-02-11 11:06:29 -05:00
2025-09-24 14:20:34 +01:00
2025-09-25 09:24:53 -04:00
2025-09-18 09:10:37 -04:00
2025-09-18 09:10:37 -04:00
2024-09-19 13:56:42 -04:00
2025-07-01 16:07:21 +01:00
2025-06-16 10:17:28 -07:00
2025-03-03 10:08:50 -05:00
2024-03-18 11:38:17 -04:00
2024-03-18 11:38:17 -04:00
2025-01-31 15:22:00 -05:00
2025-07-15 09:48:04 -07:00
2025-07-15 09:48:04 -07:00
2023-08-10 17:27:09 -05:00
2023-10-24 11:22:24 -05:00
2025-07-15 09:48:04 -07:00
2025-08-19 08:57:55 +01:00
2025-08-01 10:26:59 -07:00
2025-07-01 16:07:21 +01:00
2025-01-31 15:22:00 -05:00
2025-07-01 16:07:21 +01:00
2025-08-28 08:05:58 +01:00
2025-03-20 10:56:17 -07:00
2025-01-31 15:22:00 -05:00
2025-01-31 15:22:00 -05:00
2025-08-19 08:25:51 +01:00
2025-08-19 08:25:51 +01:00
2023-08-10 17:27:09 -05:00
2025-01-31 15:22:00 -05:00
2023-08-10 17:27:09 -05:00
2024-03-21 11:44:23 -07:00
2025-07-01 16:07:21 +01:00
2025-01-31 15:22:00 -05:00
2025-08-05 08:56:51 +01:00
2025-03-05 15:38:11 -05:00
2025-03-05 15:38:11 -05:00
2025-03-19 09:14:42 -04:00
2025-06-11 20:11:04 +02:00
2025-08-07 12:03:18 -07:00
2025-08-07 12:03:18 -07:00
2025-08-27 15:00:16 -04:00
2024-03-21 11:44:23 -07:00
2025-03-03 10:08:50 -05:00
2023-08-10 17:27:09 -05:00
2025-07-01 16:07:21 +01:00
2023-08-10 17:27:09 -05:00
2025-09-03 07:45:29 +01:00
2025-06-18 07:43:27 +01:00
2025-09-03 07:45:29 +01:00
2023-08-18 07:47:24 +01:00
2025-07-01 16:07:21 +01:00
2025-09-12 08:29:46 -04:00
2024-09-16 13:40:10 -05:00
2025-03-03 10:08:50 -05:00
2025-02-11 11:06:29 -05:00
2025-05-14 09:51:13 -04:00
2024-06-06 06:57:10 +01:00
2024-03-21 11:44:23 -07:00
2025-06-18 07:43:27 +01:00
2025-09-05 14:53:08 -04:00
2025-03-20 10:56:17 -07:00
2025-01-31 15:22:00 -05:00
2025-01-15 14:04:18 -05:00
2025-07-01 16:07:21 +01:00
2025-06-11 20:11:04 +02:00
2025-03-05 15:38:11 -05:00
2023-09-21 14:12:51 -04:00
2025-09-04 12:29:50 -04:00
2025-09-04 12:29:50 -04:00
2024-01-10 10:41:29 -05:00
2025-07-25 10:44:08 +01:00
2024-01-10 16:29:05 -05:00
2025-09-04 12:29:50 -04:00
2025-09-04 12:29:50 -04:00
2025-03-10 13:49:50 +00:00
2025-03-10 13:49:50 +00:00
2023-08-18 07:47:24 +01:00
2023-08-10 17:27:09 -05:00
2023-10-19 15:09:30 -05:00
2023-10-19 15:09:30 -05:00
2023-10-19 15:09:30 -05:00
2024-05-22 15:40:25 -05:00
2024-05-22 15:40:25 -05:00
2025-02-28 07:40:02 +00:00
2025-07-25 10:44:08 +01:00
2025-02-28 07:40:02 +00:00
2025-09-05 16:08:23 -04:00
2025-09-05 16:08:23 -04:00
2024-06-27 16:19:36 -04:00
2025-03-03 10:08:50 -05:00
2025-09-05 14:53:08 -04:00
2024-08-16 09:47:19 -04:00
2024-08-16 09:47:19 -04:00
2025-09-05 14:53:08 -04:00
2025-01-07 10:15:02 +01:00
2025-01-31 15:22:00 -05:00
2023-10-05 09:32:54 +02:00
2025-03-20 10:56:17 -07:00
2025-04-10 14:40:21 +01:00
2023-08-18 07:47:24 +01:00
2023-08-23 15:42:13 -05:00
2023-10-31 11:25:20 -07:00
2025-04-10 14:40:21 +01:00
2023-08-10 17:27:09 -05:00
2025-08-19 13:51:12 +01:00
2025-08-19 13:51:12 +01:00
2025-08-08 16:07:59 +01:00
2025-08-08 16:07:59 +01:00
2023-08-18 07:47:24 +01:00
2025-06-18 07:43:27 +01:00
2025-06-18 07:43:27 +01:00
2025-04-10 09:19:25 -04:00
2025-07-25 10:44:08 +01:00
2024-03-21 11:44:23 -07:00
2025-01-31 15:22:00 -05:00
2024-12-04 09:57:38 -05:00
2024-04-16 15:10:11 -05:00
2023-08-18 07:47:24 +01:00
2023-08-10 17:27:09 -05:00
2025-01-31 15:22:00 -05:00
2023-08-10 17:27:09 -05:00
2023-08-10 17:27:09 -05:00
2024-11-01 19:38:04 +01:00
2025-03-05 14:46:02 -05:00
2024-09-20 10:33:40 -04:00
2025-01-31 15:22:00 -05:00
2024-09-17 14:21:54 -05:00
2023-08-10 17:27:09 -05:00
2025-01-31 15:22:00 -05:00
2023-08-10 17:27:09 -05:00
2024-03-21 11:44:23 -07:00
2023-08-10 17:27:09 -05:00
2025-01-31 15:22:00 -05:00
2025-07-01 16:07:21 +01:00
2025-06-05 08:05:46 +01:00
2024-10-01 11:41:40 -04:00
2025-01-31 15:22:00 -05:00
2023-08-18 07:47:24 +01:00
2024-12-19 09:25:54 -05:00
2025-01-31 15:22:00 -05:00
2025-03-20 10:56:17 -07:00
2023-08-10 17:27:09 -05:00
2025-02-28 07:40:02 +00:00
2025-07-01 16:07:21 +01:00
2025-08-06 09:40:23 -05:00
2024-09-05 13:52:32 -04:00
2025-03-03 10:08:50 -05:00
2025-03-20 10:56:17 -07:00
2023-08-10 17:27:09 -05:00
2024-03-21 11:44:23 -07:00
2023-10-16 09:30:24 -04:00
2025-02-07 15:34:14 -05:00
2023-10-16 09:30:24 -04:00
2025-02-25 15:51:59 +01:00
2025-03-03 10:08:50 -05:00
2023-08-18 07:47:24 +01:00
2025-04-14 07:43:49 +01:00
2023-08-25 13:51:36 +01:00
2023-10-12 12:21:48 -04:00
2025-02-10 11:53:05 -05:00
2025-03-03 10:08:50 -05:00
2025-07-01 16:07:21 +01:00
2025-07-25 10:44:08 +01:00