Skip to content

Commit ea4cab3

Browse files
boukastro
authored andcommitted
cloud-hypervisor: clean up notify sockets
If cloud-hypervisor crashes then the sockets don't get cleaned up and it won't be able to start
1 parent d5283b0 commit ea4cab3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/runners/cloud-hypervisor.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ in {
8989
rm -f '${socket}'
9090
''}
9191
92+
93+
# Ensure notify sockets are removed if cloud-hypervisor didn't exit cleanly the last time
94+
rm -f notify.vsock notify.vsock_8888
95+
9296
# Start socat to forward systemd notify socket over vsock
9397
if [ -n "$NOTIFY_SOCKET" ]; then
9498
${pkgs.socat}/bin/socat UNIX-LISTEN:notify.vsock_8888,fork UNIX-SENDTO:$NOTIFY_SOCKET &

0 commit comments

Comments
 (0)