I have a Waypoint Runner and it is not able to see the /alloc
directory:
2023-05-17T23:58:34.773Z [WARN] waypoint.runner.agent.runner:
error during job execution:
job_id=01H0P2DC16D8VB5ZXZ1WTT6SX5
job_op="*gen.Job_Up"
err="rpc error: code = Unknown
desc = open /alloc/jobs/hello-world/.nomad: no such file or directory"
I call nomad-pack
to render
a pack into a jobspec
:
nomad-pack render /alloc/packs/hello_world \
--var=environment=prod --var=datacenter=host-region \
-f "/alloc/packvars/hello-world/file1.hcl" \
-f "/alloc/packvars/hello-world/file2.hcl" \
-f "/alloc/packvars/hello-world/file3.hcl" \
-o /alloc/jobs
I go look in /alloc/jobs
and see the file that was indeed created by nomad-pack
:
/alloc/jobs/hello-world/.nomad
I send a “job” to the runner:
${NOMAD_ALLOC_DIR}/waypoint project apply \
-poll \
-poll-interval="30s" \
-data-source=git \
-git-auth-type=ssh \
-git-private-key-path=${NOMAD_SECRETS_DIR}/repository-key \
-git-url=git@bitbucket.org:username/hello-world.git \
-waypoint-hcl="${NOMAD_ALLOC_DIR}/hello-world.hcl" \
-app=hello-world \
hello-world
Here is the project .hcl
file:
app "hello-world" {
build {
use "docker-pull" {
image = "hello-world"
tag = "latest"
disable_entrypoint = true
}
}
deploy {
use "nomad-jobspec" {
jobspec = "/alloc/jobs/hello-world/.nomad"
}
}
}
I watch the logs, the runner sees the projects, and runs it only to indicates:
/alloc/jobs/hello-world/.nomad: no such file or directory"
I double-check, see that it is there, and the contents look good.
Can the Waypoint Runner not see the /alloc
directory? If not, how can I indicated in the project .hcl
file where the jobspec
file is located? (No, I am not getting anything from the build
step. That is a noop for now.)