hashicorp / hashicorp/nomad

Allow Configurable Allocation GC Threshold

Open
#13,632 1 comment 8 reactions 0 assignees View on GitHub
stage/accepted theme/config type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

Currently the Nomad config offers several `*_gc_threshold` options which allow users to prevent various items in the raft state from being garbage collected after they enter a terminal state for a limited duration. This feature has been valuable when debugging failed jobs or deployments since they will remain visible even if a GC is ran.

A similar config option for allocations would be useful for debugging failed allocations. Currently it appears that allocations are marked eligible for GC as soon as they enter a terminal state.

### Proposal

I propose the addition of an `alloc_gc_threshold` config option that allows allocations to be immune from garbage collection for the specified duration after they enter a terminal state.

### Attempted Solutions

I am currently unaware of a workaround, but would be interested in any recommendations!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing *_gc_threshold configuration handling and the allocation garbage-collection eligibility logic. Trace how terminal allocations are retained or removed, then add the proposed alloc_gc_threshold behavior so terminal allocations remain immune for the configured duration; done means the option is documented and failed allocations remain visible until that period expires.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.