Skip to content

Commit

Permalink
cloud-hypervisor: clean up notify sockets
Browse files Browse the repository at this point in the history
If cloud-hypervisor crashes then the sockets don't get cleaned up and it
won't be able to start
  • Loading branch information
bouk authored and astro committed Mar 22, 2024
1 parent d5283b0 commit ea4cab3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/runners/cloud-hypervisor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ in {
rm -f '${socket}'
''}
# Ensure notify sockets are removed if cloud-hypervisor didn't exit cleanly the last time
rm -f notify.vsock notify.vsock_8888
# Start socat to forward systemd notify socket over vsock
if [ -n "$NOTIFY_SOCKET" ]; then
${pkgs.socat}/bin/socat UNIX-LISTEN:notify.vsock_8888,fork UNIX-SENDTO:$NOTIFY_SOCKET &
Expand Down

0 comments on commit ea4cab3

Please sign in to comment.