hashicorp / hashicorp/nomad

validate volume_mounts don't override templates and payloads

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

Description

In https://github.com/hashicorp/nomad/issues/7796 we determined that `volume_mounts` (both host volumes and CSI volumes) "shadow" the destinations of template, artifact, and dispatch_payload because the mounts are created by the task isolation when we launch the task (ex. by Docker's `mount` option), which happens well after template rendering and other pre-run hooks.

We've documented this behavior at https://www.nomadproject.io/docs/internals/filesystem#templates-artifacts-and-dispatch-payloads but it would also be nice if we were to validate the jobspec to warn the user against doing this (and perhaps in a later version return an error instead of a warning).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the jobspec validation entry point and the behavior described in issue #7796. Review the documented interaction between volume_mounts and templates, artifacts, and dispatch_payloads, then determine how validation should warn about overlapping destinations; done means the warning covers both host and CSI volumes and has corresponding validation coverage.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.