Automattic / Automattic/hostmgr

The file "dhcpd_leases" couldn't be opened.

Open
#80 2 comments 0 reactions 0 assignees View on GitHub
bug hostmgr
Dominant language
Swift
Stars
12
Forks
3
Avg merge
4h 50m
Merged PRs (30d)
4

Description

This is a fun one, because it's not our bug.

macOS re-uses a pretty old part of the OS for handing out IP addresses to VMs – it's the same part of the OS that handles Internet Connection Sharing (so if I have a computer that wants to share your computer's internet connection, your computer will use a DHCP server to hand out a valid address to my machine – same deal here, except it's a VM on the same computer, not a different one).

There are a few workarounds – fiddling with internet connection sharing will often cause it to work _eventually_, in some cases upgrading the OS fixed it immediately. In others, it's just hosed and starting VMs will consistently fail.

That hasn't happened in production yet, which is super nice, but if it does it'll be annoying to try to fix.

There are no public APIs to accomplish what we're after here (get the IP address of a running VM), so we're stuck with this approach for now.

---

If we ever _really_ need to, we could ask Apple for the `vmnet` entitlement and have the VMs receive a DHCP address from the cluster network instead of from the local machine. This dramatically increases complexity though, so it'd be super nice to avoid it.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by locating the macOS DHCP lease lookup and clarify whether the goal is a workaround for missing or unreadable "dhcpd_leases" files or a move to Apple's vmnet entitlement; done is a defined recovery path that reliably obtains a running VM's IP address.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift
Domain
infrastructure, networking, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.