lima-vm / lima-vm/lima

Delete `/tmp/lima-psl-*` directories even on `limactl delete -f`

Open
#1,117 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

On macOS, for portforwarding to "privileged" port on localhost we create "pseudo-loopback" forwarders, so we can listen on `0.0.0.0` (which doesn't require root) and then reject any connection that does not come from localhost.

These forwarders are not cleaned up by `limactl delete -f`. macOS cleans up regular files and directories 3 days after they have been last accessed, but this does not happen for sockets, so these will hang around forever.

So in addition to deleting them on forced delete, we maybe also want to do the cleanup of older instances that may have been left behind when an instance crashed, or the host was rebooted, or similar. Normally the right way to deal with this would be to create the sockets under `/var/run` (which is completely wiped on reboot), but that requires `root`, which is what we are trying to avoid by creating these forwarders.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.