-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Hello,
I'm not fluent at all in go and go template and the worst of all I'm quite new to nomad but I found the following behavior strange.
I have a .nomad.tpl file for nomad pack with the following:
job "hello_pack" {
…
group "app" {
…
task "server" {
driver = "docker"
…
config {
…
volumes = ["${abspath(".")}/packs/hello_pack:/app"]
}
}
}
}
The aim is to mount a relative folder. (I took my inspiration from there hashicorp/nomad#9369 (comment))
Result:
- nomad-pack complains when I try to do a
nomad-pack run
! Failed To Parse Job Specification
Error: input.hcl:122,23-31: Error in function call; Call to function "abspath" failed: filesystem function disabled., and 1 other diagnostic(s)
- but when I render the final hcl file with
nomad-pack render
, the result is valid for nomad and so, the rendered job can be run with thenomad job run
command.
The behavior seems odd to me (why in one case it's allowed and disallowed in the other?). I would expect the same result (both running).
Version numbers:
- Nomad v1.2.6 (a6c6b475db5073e33885377b4a5c733e1161020c)
- Nomad Pack v0.0.1-techpreview3 (568ac5e)
jeteve
Metadata
Metadata
Assignees
Labels
No labels