Is Waypoint Runner able to access the alloc directory?

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:
    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:


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 \ \
    -waypoint-hcl="${NOMAD_ALLOC_DIR}/hello-world.hcl" \
    -app=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.)

I have played with and it looks like that refers to a temporary directory that Waypoint uses.

${} = /tmp/waypoint2725867116

The project .hcl file is passed to Waypoint via the waypoint project apply command. The project is handed off to a Waypoint Runner. So I assume that jobspec will be looking in the filesystem where the Runner is running. Or is the jobspec parameter processed at the time of project submission? In that case I would assume that jobspec would be looking in the filesystem where the waypoint project apply is run. I have tried referencing files in both of those locations to no avail.

Where is jobspec looking for files? What filesystem does it have access to?

How can I have jobspec look for files in arbitrary locations on the filesystem?

Hi @SunSparc,

The reason that isn’t working is that by default, the on-demand runner system is used which executes each job in a fresh container. That’s why you’re not seeing that shared /alloc directory being visible.

You can’t have the jobspec look for files anywhere currently, only the files in the project are available.

1 Like

@evanphx, thanks, that is good to know. I will have to revise my plans.