Backport #16030 System and sysbatch jobs always have zero index to 1.2.x #16044
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 aNOMAD_ALLOC_INDEX
of 0. So interpolation viaper_alloc
will not work as soon as there's more than one allocation placed. Validate against this on job submission.