-
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
rsync-auto not working on Mac OS X #3108
Comments
Hi there, I'm experiencing the same effect with a Windows 8.1 Host and with |
It looks like it may not be getting your changes. We use the listen gem for this. At the point where you're seeing no output, all the work is done by that gem. I would need to be able to reproduce this to help at all. Unfortunately, it works for me and the few people I pinged to test it... if you can come up with a clean repro case or if you can dig deeper, I'd apprecaite it! Thanks! |
I experience the same issue with the rsync auto command. After testing with different cases, it seems that the issue occurs when the watched folder has a big depth and a lot of (small) files. If you narrow the watched path, the watcher reacts faster. Since the command watches excluded folders (see #3159), in our case it also watches folders like Hope it helps. |
That's interesting. A bit under the covers: Vagrant will use something like inotify (I think on Darwin its called "fsevents") to listen for changes. So really it is up to the operating system to report those changes. Vagrant isn't polling or anything like that. This was supposed to avoid any deep slowness. |
Yep I've seen that. Could you please provide us a build of the rsync plugin excluding folders from watch ? |
@arnaudbreton Yes, there is another issue tracking that, and I shall. |
You talk about #3159 ? For information, I'm currently experimenting to launch I would be happy to test a custom build myself if there is instruction about building plugins and how-to replace bundled one. |
@arnaudbreton can I ask what code you added to your gruntfile to trigger vagrant rsync? |
Sure. Here's the tasks' code: https://gist.github.com/arnaudbreton/9517344 |
Thanks! |
Hi, I think rsync is not properly instructed to sync just the files that fsevents hands off....when I do a watch in vagrant, and just change one file on the host, my watch detects all files being modified. That leads me to infer the following:
I hope rsync is not configured to sync entire folders after fsevents has done most of the work already: detect and report changed files. It would be mad to then let rsync redo that work by going over each file one by one. It would be awesome if somebody could check this. It could be a gain to have rsync work with specific paths. It might be the solution to the problem reported. |
@arnaudbreton: in that case I would bypass vagrant's rsync altogether, and modify your script to selectively sync the reported files and folders. It's just another one-line shell operation I guess. I will test this when I have the time, but maybe somebody beats me to it ;) |
I think this fix could solve your issue: #3186 Let me know |
Finally had a chance to test, and it runs smooth ;) Tnx guys! |
rsync-auto not working for me either, need to manually run vagrant rsync so I can see my changes. NFS is not an option since it's slow for me.. it takes some seconds to see my changes. Any news on this? |
Are you on 1.5.1? If not, update :) |
Yes, I am. |
What is not working for you? |
Simple test, renaming one vhost to a wrong dir, so I can get a 404 not found.
|
I would not deduce that from this info, but you are probably withholding other findings? vhosts that automatically reload? what technology are you using? |
Hehe, no they don't reload. For example you have a vhost example.com mapped to /var/www/vhosts/example.com.
Anyway this is not the relevant point here, it was just to check how instant was the changes to the VM, in this case it never happens with rsync-auto. Can't really use vagrant now, as none of the other sharing options works for me without some delay anyway. I'm using a macbook air with a pci-e ssd, so the disk speed is not an issue here. |
The discussion about rsync slowness are here: #3249 |
I actually found that |
A little late to the party, but I am experiencing the same issue on Mac OS X 1.8. However, I am unable to reproduce the problem on 10.9. Also, I am on Vagrant 1.5.3. @fabioneves Did you ever find a workaround or a solution? |
@jmreicha Workaround?
|
Hi, I am on Mac OSX 1.9.5 and Vagrant 1.7.2 Any advice which can help me? |
same here |
I found a solution to my problem. Apparently, rsync-auto on mac doesn't work well when there are uppercase and lowercase letters in the directory name. Hope this will help other people who go frustrated as me :) |
To help other googlers, I just found the solution to my rsync-auto problem by adding the --poll arguement to the command. mentioned here |
I am experiencing this issue on MacOS 10.12 and Vagrant 1.8.6. Initial rsync works as expected but rsync-auto takes upwards of 30 seconds to catch and write a change. |
Reinstalling rsync via homebrew seems to have solved this for me. Adding the --poll option as @danshumaker said worked as well but it also seemed to stress my CPU and battery a fair amount. |
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. |
Hi there, I just updated to 1.5 and would like to switch from NFS share to rsync.
When running
$ vagrant rsync
everything is fine and gets updated, however running$ vagrant rsync-auto
only outputs the following and does nothing upon file changes.Running a manual
$ vagrant rsync
synchronises the changes correctly again.Some debug information:
The text was updated successfully, but these errors were encountered: