Skip to content

Commit

Permalink
Keep the launchd daemon alive
Browse files Browse the repository at this point in the history
Working with multiple lima clusters in the recent weeks I found that
socket_vmnet is not running for unknown reason. The typical flow is
trying to start the clusters, and lima hostagent fails with connection
refused with /var/run/socket_vmnet. This happens to me one or more times
in the same day. Trying to run a stress test creating and destroying the
lima clusters 50 times fails after several runs and from the point of
the failure, all runs failed.

The issue seems to be that socket_vmnet is stopped by launched because
it seems to be idle and it is never started again. Adding the keep alive
option eliminated this issue.

With this change the daemon is kept running and it should restart after
failures.
  • Loading branch information
nirs committed Sep 16, 2024
1 parent 8513f80 commit 39166a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions launchd/io.github.lima-vm.socket_vmnet.bridged.en0.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<string>/var/log/socket_vmnet/bridged.en0.stdout</string>
<key>RunAtLoad</key>
<true />
<key>KeepAlive</key>
<true />
<key>UserName</key>
<string>root</string>
</dict>
Expand Down
2 changes: 2 additions & 0 deletions launchd/io.github.lima-vm.socket_vmnet.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<string>/var/log/socket_vmnet/stdout</string>
<key>RunAtLoad</key>
<true />
<key>KeepAlive</key>
<true />
<key>UserName</key>
<string>root</string>
</dict>
Expand Down

0 comments on commit 39166a7

Please sign in to comment.