Skip to content

Conversation

@mismithhisler
Copy link
Member

@mismithhisler mismithhisler commented Dec 1, 2025

Description

There was no good way to reference an image located in the NOMAD_ALLOC_DIR. Relatives paths did not work (this does not fix that), and the NOMAD_ALLOC_DIR envvar was set to /alloc which is used in containers. These changes set the filesystem envVars to host paths so they can be interpolated correctly in a job spec.

Testing & Reproduction steps

Links

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

tgross
tgross previously approved these changes Dec 2, 2025
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Where this might cause some quirky behavior is if the task driver were to expose the task dir and allocdir to the task with image isolation. But as far as I know there's no existing task driver that does this. A reasonable approach for the task driver to support this would be to expose it as a sshfs or something like that, but at that point the task driver needs to know the real source on disk so it'd be responsible for doing any environment variable mapping in the userdata it injects. (Mostly leaving this rambling comment so that if we wonder about it in the future we have a record of why 😁 )

@mismithhisler
Copy link
Member Author

@tgross good points that I didn't consider, thanks!

@mismithhisler mismithhisler added the backport/1.11.x backport to 1.11.x release line label Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.11.x backport to 1.11.x release line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants