Closed itowlson closed 2 years ago
Not sure if this will be helpful at all, but may at least be informative if the behavior is different: It looks like Hippo supports specifying a particular spin binary path.
Could we try adding something like Spin__BinaryPath = "<path to spin on host>"
to the Hippo job env, re-run start.sh
and see if behavior changes?
@vdice Hmm, interesting! That fails with:
2022-06-16T10:24:43+12:00 Driver Failure failed to launch command with executor:
rpc error: code = Unknown desc = file /home/ivan/github/spin/target/debug/spin
not found under path /home/ivan/github/fermyon-installer/local/data/nomad/alloc/8a8d6670-ba70-c433-f00f-92d1d84fc4d2/spin
Thanks @itowlson.
It appears that configuration is meant to represent a relative path in the allocation (cc @bacongobbler to check my understanding) and so perhaps not helpful here.
My only other idea is to see if we can try overriding the Nomad:Driver value. Not sure if it is resolving to exec
or raw_exec
for you (OperatingSystem.IsLinux()
). Does setting Nomad__Driver = "raw_exec"
help?
I am not sure how to test that given that Hippo is downloaded rather than taken from a local copy - is there something I can set in the installer to force it?
> System.OperatingSystem.IsLinux();;
val it: bool = true
I'm not sure if exec
or raw_exec
makes a big difference. I tried these two jobs:
job "spin-raw-exec" {
datacenters = ["dc1"]
type = "batch"
group "spin-raw-exec" {
task "spin-raw-exec" {
driver = "raw_exec"
config {
command = "spin"
args = []
}
}
}
}
job "spin-exec" {
datacenters = ["dc1"]
type = "batch"
group "spin-exec" {
task "spin-exec" {
driver = "exec"
config {
command = "spin"
args = []
}
}
}
}
and both failed, although with different statuses: exec
gave me the "file spin not found" message, raw_exec
gave me "Terminated: exit code 2".
Oh! spin
without arguments looks like it might return exit code 2. Maybe raw_exec
worked and I just looked for logs in the wrong place!
@vdice YES! raw_exec
works for my demo case - I just got confused by the output. But it looks like Hippo is sending me exec
. Is there a way to override the Hippo setting so I can test this with a real Spin app?
🎉 Excellent! I wonder if raw_exec
is a prereq for WSL -- and if so, if we can conditionailize things so that the installer just works for this case (or, actually, maybe the conditional in Hippo is a better fit 🤔).
Anyways, to the task at hand. Yes, it should be an env setting on the hippo job similar to the spin binary path we tried above.
Try adding Nomad__Driver = "raw_exec"
to the Hippo job env.
🎉 IT WORKS 🎉
I can now bring up Nomad and Hippo, but when I do a
spin deploy
, the application (the Spin job goes into Unhealthy.The status information for a typical Spin job is: