Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NFS sharing in macOS 10.15 (based on #11105) #11108

Merged
merged 5 commits into from
Oct 10, 2019

Conversation

chrisroberts
Copy link
Member

This is a continuation of the work started in #11105

The firmlinks defined on the system can be located within
a system file (/usr/share/firmlinks). This can be read to
generate a simple map that can then be used for updating
paths as required.

Added a new host capability (resolve_host_path) which is
used by the bsd host nfs_export capability. The bsd host
implements this capability as a no-op, and the darwin
host implements this capability to handle firmlinks.

andyfowler and others added 5 commits October 8, 2019 13:21
On OS X 10.15, / is read-only and paths inside of /Users (and elsewhere)
are mounted via a "firmlink" (which is a new invention in APFS). These
must be resolved to their full path to be shareable via NFS.

/Users/johnsmith/mycode  =>  /System/Volumes/Data/Users/johnsmith/mycode

We check to see if a path is mounted here with `df`, and prepend it.

Firmlinks are only createable by the OS and this wasn't supposed to be
visible to applications anyway:
https://developer.apple.com/videos/play/wwdc2019/710/?time=481
…ries

Using the resolve_host_path capability allows hosts to modify the
shared folder directory while keeping the logic contained within
the specific host implementation.
For bsd the resolve_host_path capability is a no-op. For darwin
hosts, if firmlinks are defined on the system, paths will be properly
resolved to real path.
@briancain briancain self-assigned this Oct 9, 2019
@briancain briancain added this to the 2.2.6 milestone Oct 9, 2019
@andyfowler
Copy link
Contributor

Thanks, @chrisroberts! Appreciate you running with this. Isolating path resolution from the NFS class definitely feels like a cleaner approach! I saw that /usr/share/firmlinks file, and wasn't really sure how authoritative it was, but Apple refer to it, so I assume it's a supported means of decoding firmlinks.

I tested this branch on the "GM" version of 10.15, and it works great! 🚢

❯ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15
BuildVersion:   19A582a

Copy link
Member

@briancain briancain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ 🍎

@vanderlee
Copy link

Any idea on when this fix will become available to the public?

@briancain
Copy link
Member

Hi @vanderlee - We are currently working on pushing out the next release of Vagrant (2.2.6) as soon as possible. Sorry I don't have an exact date.

@chrisroberts chrisroberts merged commit b12a232 into hashicorp:master Oct 10, 2019
@chrisroberts chrisroberts deleted the macos-catalina branch October 10, 2019 16:20
@jakedowns
Copy link

jakedowns commented Oct 14, 2019

Vagrant 2.2.6 is out now

@ghost
Copy link

ghost commented Jan 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants