robur-coop / albatross

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

albatross-daemon fails to restore unikernels because fifo directory does not exist #105

Closed reynir closed 2 years ago

reynir commented 2 years ago
albatrossd[499]: albatrossd: [ERROR] failed to create [vm: resolver]: file /run/albatross/fifo/resolver error in mkfifo: No such file or directory

The fifo directory is created (only) by the albatross_console.service systemd script. I am not sure why it is there and not in albatross_daemon.service. https://github.com/roburio/albatross/blob/340f0e4771b57e50f4d7ff63d3115f353db50527/packaging/Linux/albatross_console.service#L15-L17

hannesm commented 2 years ago

since albatross_daemon should depend on albatross_console, that shouldn't be an issue? OTOH maybe albatross_daemon should on startup do a mkdir -p on the required directories!?

reynir commented 2 years ago

The issue seems to be that albatross_daemon depends on albatross_console.socket and not directly on albatross_console.service. Then the socket file is created and albatross_daemon is started but albatross_console.service might not have been started just yet.

Looking at the code it seems albatross-console only touches albatross/fifo/ if prompted by albatross-daemon so I think moving those lines to albatross_daemon.service would fix the issue.