-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Catalina filesystem changes appear to introduce NFS sync issues #10961
Comments
Quick question @bjfresh - Can you bring up new guests, or does this only affect guests that were created on a previous version of macOS? Thanks. |
@briancain seems a fresh, unmodified clone of the Roots Example Project is able to launch without issue for me. |
Interesting.... @bjfresh well that is good news. 🙏 We might be able to get some sort of handling around old guests on newer upgrades of macOS, but if fresh guests seem to work at least there's a path forward currently and isn't completely busted. |
It's not a vagrant issue but nfsd/macos issue. But if you explicitly add path to data volume to So i think it's wrong firmlink handling done by either macos of nfsd |
I'm facing the same problem but I just can't make it work. Everything has been updated, but the mismatch message always come back. Do you know if there is any solution or workaround? |
workaround is to add |
same problem here. not able to get around the mismatch, as EDIT:
|
Where exactly would I add this to Vagrantfile? I have added it to my etc/exports but it keeps changing back with every vagrant up. Another option might be to use nfs_export: false but I can’t figure out where to put it in my Vagrantfile or vagrant.default.yml. |
Where you describe path to source folder:
change to:
but, if you commit this file, this will crash vagrant for all other users.
Here:
|
I have tried rather naive:
Which seems to construct correct path. Before running Btw, the template that is used to write to the exports file is located in |
There's even a much simpler approach, make sure the vagrant is up
restart vagrant and you're done. |
If you're here like I was because of Docker For Mac and NFS, I've got you: https://www.firehydrant.io/blog/nfs-with-docker-on-macos-catalina/ |
edited to make the config backwards compatible @brablc, try this, it worked for us:
|
For me the workaround looks like this now, since my Vagrantfile uses "." to mount the current working directory:
This provides a workaround without breaking the config for non-Catalina hosts. (This still needs existing exports in /etc/exports to be removed first or vagrant will complain about a path mismatch.) |
Great! Do you know how to implement this in the Trellis Vagrantfile? |
The above solutions work to start the vagrant box, but when I do |
After som hours of struggling I found out that you can not have your vagrant projects in the Documents folder anymore, because nfs reports "stale file" when trying to access the nfs mount. Solutiuon: create a new folder in your home directory, ie. /Users/[user]/Development and move your projects there. Delete your cached server: rm -rf .vagrant. Then your can start your vagrant server without problem. I do not know what happened with the Documents folder when upgrading to OS X Catalina. |
The temporary solution for my case was to change the sync from
Also as people described above you have to change the folder map to |
Okay, found it out for the trellis Vagrantfile! if Dir.exist?("/System/Volumes/Data")
ANSIBLE_PATH = "/System/Volumes/Data" + __dir__ # absolute path to Ansible directory on host machine for macos Catalina
else
ANSIBLE_PATH = __dir__ # absolute path to Ansible directory on host machine
end |
Had the same issue as you described here, the solution to make NFS work again was the combination of @jeroenmoons and yours (Moving the project outside the |
Same here on macOS 10.15.1. Getting a mount time-out. Seems like the
Any ideas on a workaround? |
i manage to fix this issue @ErwinSteffens can you post your mount section of your Vagrantfile? |
Hello @lbabayigit , I also have this mount time-out problem. How did you solve it? This is my mount section:
|
Any hints? |
I too am having the timeout issue on Catalina with 2.2.6 If I SSH into my VM I can run
and it works perfectly. It appears that the core of NFS works but there's some other detail vagrant must add to the mount command. |
@lbabayigit Here it is. No special config I think:
I have updated the logs in my post above as I copied/pasted the wrong nfsd logs. |
@ErwinSteffens you first need to change your folder structure to /System/Volumes/Data/ |
Have you tried with a single nfs mount ? maybe having multiple ones can cause the issue |
@kenji21 Tried a single NFS mount and this works. Hmm, is there a way to work around this? |
It seems like restarting your mac installs patches ( https://semver.org/ ) without even informing us about it. So what I did was. 1) vagrant up => if fail 2) restart Mac and over again during a couple of days. One day it finally worked with nfs, I haven't restarted my computer since and I don't dare :D It is now working without the prefix I have:
It's Apple's fault but why the heck is this issue closed here? Shouldn't the maintainers try to talk with Apple that they have destroyed Vagrant and that this is still an issue depending on which patch version of Catalina you use? |
@OZZlE I think the original problem was that absolute paths should be used The issue with the time-outs is only occurring for us on macOS 10.15.1 (19B88). |
@ErwinSteffens alright but in 19A602 using the absolute path Probably Apple doesn't push out system updates to all users in the world at the same time. So even when I though I had the latest Catalina due to accepting all updates, I did infact not have it and no possibility to get it other than wait. Meanwhile this was fixed in vagrant 2.2.6 for the latest Catalina but not backward compatible with the latest Catalina that I could actually install..... or that some users had installed... |
For me it works when i have one NFS mount, but if I have two mounts it hangs at "Mounting nfs folders" |
Thanks @Nilz11. This temporarily solved the issue. We used NFS for mounting multiple directories that were not performance critical (ansible scripts etc.). We removed them the NFS option, so now they use the native VirtualBox folder share capability. We use NFS to keep the performance high for the application code only. |
Just an extreme oddity of macOS Catalina: It seems that the ~/Documents directory cannot work with NFS, even though any other directory works (assuming homedir shared). It always shows as a stale filehandle. I have no idea why this would be. Edit: The ~/Documents NFS problem |
I fought this for over a week and in the end the only solid solution was downgrading my OS from Catalina. She's a real nuisance. |
What is the process to get this fixed? Is there anything vagrant can do to work around this? Should we file a bug report at Apple (https://developer.apple.com/bug-reporting/)? |
I already did (FB7433067) however my report doesn't explain that the issue occurs only when there are multiple NFS mounts. It would be great if you could also report it. More reports they get - higher chance they will fix it. BTW - 2 days ago they announced 10.15.2 (19C39d) release, but they didn't mention NFS problem. |
I can confirm the multiple NFS mounts problem. I managed to fix it by manually changing the mapping in the /etc/exports file. I removed the nginx mapping part and now it's working again. FIXED
BEFORE (BROKEN)
|
I was getting stuck with this fixed it! #1941 (comment) |
this solves my issue in Catalina 10.15.1 |
Yes I added full disk access on both Virtual box and nfsd |
A co-worker tried thus but then ran into troubles with our setting for nfs, e.g. locking didn't work. In the end we advised everyone not to use those suddenly special folders for vagrant machines anymore 🤷♀️ |
If you get locking issues, try moving your vagrant project to some folder like |
Thanks! |
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. |
Vagrant version
2.2.5
Host operating system
Mac OS X Catalina Public Beta 2
Guest operating system
Ubuntu 16.04.1 LTS
Vagrantfile
Debug output
https://gist.github.com/bjfresh/673d66b9ab814e6ca66404ca6755a885
Expected behavior
NFS syncs the folder
Actual behavior
Catalina introduces separate volumes for system and user data (Root changed from "/" to "System/Volumes/Data/" ), which appears to be the cause of this unexpected mismatch:
Steps to reproduce
FWIW I've updated Virtualbox, Vagrant, and relevant plugins
The text was updated successfully, but these errors were encountered: