robur-coop / albatross

Albatross: orchestrate and manage MirageOS unikernels with Solo5
ISC License
143 stars 17 forks source link

locations of solo5 binaries #63

Closed hannesm closed 3 years ago

hannesm commented 3 years ago

I got some (spurious?) errors when solo5-elftool and solo5-hvt are installed by the system in PATH (instead of dbdir). check that the code does not require them to be in dbdir.

reynir commented 3 years ago

Reviewing the code, I can think of a situation where this might happen: a unikernel is started with restart-on-fail, and then solo5-hvt is moved to a different directory. The location of the tender is resolved at create time. I will test this hypothesis and think of a fix.

Does this also happen for solo5-elftool? I don't see how it could happen, but I might be missing something.

hannesm commented 3 years ago

@reynir thanks for looking through the code. I as well briefly looked into the code and was surprised that this happens.

What I observed:

I'll try to reproduce (the above is a system where neither opam nor ocaml are installed, but only albatross + solo5 from packages) on a fresh system.

reynir commented 3 years ago

My hypothesis is wrong. I created a unikernel with the mirage-skeleton hello example with restart-on-fail, and it handled me moving solo5-hvt around.

Are you positive /usr/local/bin is in PATH of the albatrossd process? Can you verify with procstat environment $(cat /var/run/albatross_daemon.pid)?

hannesm commented 3 years ago

@reynir indeed /usr/local/bin is not in PATH of the albatross_daemon binary. thanks for pointing me to procstat, I did not know of that before.

hannesm commented 3 years ago

does this mean that the albatross daemon rc script should extend the PATH variable with /usr/local/bin,/usr/local/sbin?

reynir commented 3 years ago

Sorry, I missed your second comment. If the tools are expected to be there I would think yes? I'm not sure what's best practice on FreeBSD.