Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #16030 System and sysbatch jobs always have zero index to 1.2.x #16044

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

tgross
Copy link
Member

@tgross tgross commented Feb 2, 2023

This hand-backports #16030 to 1.2.x, because the original PR touched some code that has a minor new feature for 1.5.0 (per_alloc host volumes) and because there are some significant conflicts over the env vars page, for which the new table syntax was never backported.


Service jobs should have unique allocation Names, derived from the Job.ID. System jobs do not have unique allocation Names because the index is intended to indicated the instance out of a desired count size. Because system jobs do not have an explicit count but the results are based on the targeted nodes, the index is less informative and this was intentionally omitted from the original design.

Update docs to make it clear that NOMAD_ALLOC_INDEX is always zero for system/sysbatch jobs

Validate that volume.per_alloc is incompatible with system/sysbatch jobs. System and sysbatch jobs always have a NOMAD_ALLOC_INDEX of 0. So interpolation via per_alloc will not work as soon as there's more than one allocation placed. Validate against this on job submission.

Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

Just need to fix the missing import 👍

scheduler/scheduler_system_test.go Show resolved Hide resolved
Service jobs should have unique allocation Names, derived from the
Job.ID. System jobs do not have unique allocation Names because the index is
intended to indicated the instance out of a desired count size. Because system
jobs do not have an explicit count but the results are based on the targeted
nodes, the index is less informative and this was intentionally omitted from the
original design.

Update docs to make it clear that NOMAD_ALLOC_INDEX is always zero for
system/sysbatch jobs

Validate that `volume.per_alloc` is incompatible with system/sysbatch jobs.
System and sysbatch jobs always have a `NOMAD_ALLOC_INDEX` of 0. So
interpolation via `per_alloc` will not work as soon as there's more than one
allocation placed. Validate against this on job submission.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/docs Documentation issues and enhancements type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants