Host env vars take precendece over task env vars with exec/raw_exec #11202
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/driver/exec
theme/driver/raw_exec
type/bug
Nomad version
Nomad v1.1.4 (acd3d7889328ad1df2895eb714e2cbe3dd9c6d82)
Operating system and Environment details
Ubuntu 20.04
Issue
When running
exec
orraw_exec
tasks, theNOMAD_*
environment variables are overwritten if they are defined in the host as well.Reproduction steps
1 Start a Nomad agent with a
NOMAD_*
env var defined$ NOMAD_ALLOC_ID=not-an-alloc nomad agent -dev
exec/raw_exec
job that prints its own env varsNOMAD_ALLOC_ID
Expected Result
The allocation ID
Actual Result
The value set in the host (
not-an-alloc
)Job file (if appropriate)
The text was updated successfully, but these errors were encountered: