Open tgross opened 11 months ago
@tgross Can I work on this issue?
Hi @devashishTaneja! Feel free to give it a try. The relevant code is in nomad/structs
.
The only tricky bit is that we tend to validate the structs.Job
struct by calling a Validate
method on each of the many many sub-objects. In this scenario, we'll need to validate across those sub-objects because the Job.TaskGroups[].Networks[]
blocks are validated separately (and before) the Job.TaskGroups[].Tasks[].Driver
field.
As described in https://github.com/hashicorp/nomad/issues/18851, setting the
network.hostname
field is not allowed unless the task group is using bridge networking mode and Docker tasks. One reason for this is that the default mode ishost
, and that would mean each task could overwrite the host's own hostname! This is documented athostname
:Unfortunately we don't validate this. Instead, we place the allocation but it will always fail. We should instead validate this at the time of job submission.