Hi there,
I’m just getting started with nomad, sorry if this is an obvious question but I’m struggling to get my head around what the evaluation is doing when I resubmit a job?
job "job_alpine-batch" {
datacenters = ["dc1"]
type = "batch"
group "group_alpine-batch" {
task "task_run-date" {
driver = "docker"
config {
image = "alpine:latest"
command = "/bin/date"
}
resources {
cpu = 100
memory = 32
}
}
}
}
I submit the job and it completes
# nomad job run ./batch-alpine.nomad
==> 2021-07-14T14:46:39+01:00: Monitoring evaluation "0477568d"
2021-07-14T14:46:39+01:00: Evaluation triggered by job "job_alpine-batch"
==> 2021-07-14T14:46:40+01:00: Monitoring evaluation "0477568d"
2021-07-14T14:46:40+01:00: Allocation "98aca893" created: node "ca13fdd6", group "group_alpine-batch"
2021-07-14T14:46:40+01:00: Evaluation status changed: "pending" -> "complete"
==> 2021-07-14T14:46:40+01:00: Evaluation "0477568d" finished with status "complete"
# nomad alloc logs 98aca893
Wed Jul 14 13:46:43 UTC 2021
I then submit the job again
# nomad job run ./batch-alpine.nomad
==> 2021-07-14T14:47:00+01:00: Monitoring evaluation "06d1c02a"
2021-07-14T14:47:00+01:00: Evaluation triggered by job "job_alpine-batch"
==> 2021-07-14T14:47:01+01:00: Monitoring evaluation "06d1c02a"
2021-07-14T14:47:01+01:00: Evaluation status changed: "pending" -> "complete"
==> 2021-07-14T14:47:01+01:00: Evaluation "06d1c02a" finished with status "complete"
#
For a time I thought that it was running the job again but I could never see the log output change (newbie), so what is it evaluating that it finished?
I’ve tried reading the internals documentation but it doesn’t seem to be sinking in, sorry
For batch jobs in particular to rerun that job will I have to change the job name or possibly use a parametrised job?
Appreciate anyone taking the time to help me out, I promise to pay it forward in the future.
Gary