host volumes: add configuration to GC on node GC (#25903)

When a node is garbage collected, any dynamic host volumes on the node are
orphaned in the state store. We generally don't want to automatically collect
these volumes and risk data loss, and have provided a CLI flag to `-force`
remove them in #25902. But for clusters running on ephemeral cloud
instances (ex. AWS EC2 in an autoscaling group), deleting host volumes may add
excessive friction. Add a configuration knob to the client configuration to
remove host volumes from the state store on node GC.

Ref: https://github.com/hashicorp/nomad/pull/25902
Ref: https://github.com/hashicorp/nomad/issues/25762
Ref: https://hashicorp.atlassian.net/browse/NMD-705
This commit is contained in:
Tim Gross
2025-05-27 10:22:08 -04:00
committed by GitHub
parent 4d8c873b46
commit 3f59860254
17 changed files with 105 additions and 8 deletions

View File

@@ -94,6 +94,7 @@
"gc_interval": "6s",
"gc_max_allocs": 50,
"gc_parallel_destroys": 6,
"gc_volumes_on_node_gc": true,
"host_volume": [
{
"tmp": [