robur-coop / albatross

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

Systemd: include network.target in After= #90

Closed reynir closed 2 years ago

reynir commented 2 years ago

On a system where the service bridge is configured by NetworkManager albatross fails to restore VMs after a reboot due to the bridge not being up:

Jan 03 15:02:20 solsort albatrossd[1877]: albatrossd: [ERROR] failed to create [vm: stub-resolver]: interface service does not exist

Likely, adding network.target to the list in After=... in the systemd service files will fix this. I have added network.target on the machine and will confirm whether this fixed the issue (after I have done some upgrades).

hannesm commented 2 years ago

Thanks for your report -- is this something we should add to the systemd file?

reynir commented 2 years ago

Yes, I think that would be a good idea.

For what it's worth it was not sufficient with my setup (bridge managed by NM) and I have added NetworkManager-wait-online.service as well.

hannesm commented 2 years ago

would you mind to push a PR? maybe putting the NetworkManager-wait-online as well (and describe in the README that if one doesn't use network manager to comment that bit out?)