-
Notifications
You must be signed in to change notification settings - Fork 147
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
Various issues associated with Windows/POSIX synchronization #28
Comments
Hi @Toilal, thanks again for the report. Support for Windows <-> POSIX synchronization is a major goal, and things should work, so I definitely want to figure out what's going on. I don't use Windows on a daily basis, so the testing on that side of things doesn't get the attention that it should. I'm hoping to change that in the next release. I think there are a few issues here:
I appreciate your offer for help, but I should be able to sort these issues out in the next few days. As I mentioned in the other issue you filed, I'm trying to have a new version released by early next week, and I'd be grateful if you could try it again. |
Hi @Toilal, I've had a chance to address most of these issues with 672263f and 1e842d2. I'm still trying to figure out what's causing the "unable to ensure path does not exist: path exists" error for symlinks. Windows does support symlinks, sort of. They aren't really useful until Windows 10 because they required complex permissions to create before that. Consequently, Mutagen doesn't try to support them on Windows (at the moment). But if they already exist, Mutagen will show the error "unable to ensure path does not exist: path exists" before it shows the error "unable to create symlink: symlinks not supported on this platform". Can you tell me a little bit more about the folders you're synchronizing? What is the origin of the symlink files? Were they created on the Linux side? Did they already exist on the Windows side as native Windows symlinks (reparse points)? |
Symlinks are coming from the windows side (alpha), Linux side (beta) was empty at first. These are native windows links. |
I'm investigating alternatives to NFS shares between windows and Ubuntu (through Vagrant and winnfsd) for docker based development environments. This project seems really good and if it work properly, i'll try to wrap it into a vagrant plugin to share folders between host and VM trough Vagrantfile configuration. This should improve the IO performance of the application being develop in such environment. |
If symlinks can be supported properly on Windows 10+ only, it will be just fine. WinNFSD supports symlinks properly when processing is running as admin only. Maybe you could perform a beta/rc release so I can test your fixes ? |
Okay, I think I've figured out a strategy for Windows symlink support, and I've implemented it in 2e82f53. It took a little thinking about, but I think it actually makes symlink support better overall, even on POSIX systems. Mutagen now has three symlink synchronization modes: sane (the default), ignore, and POSIX raw. These modes can be specified when a session is created. The sane mode synchronizes only those symlinks that can be reliably round-tripped between POSIX and Windows. This essentially limits support to those symlinks which are relative paths, don't contain certain special characters (namely Sane mode on Windows also still requires the Ignore mode is exactly that: any symlinks seen in either synchronization root are ignored and not propagated. POSIX raw mode is a mode that only works between POSIX systems: it copies the symlink target exactly, without any validation or normalization. POSIX symlinks are just opaque blobs, and they can be round-tripped reliably. I think the combination of these three modes should cover most use cases. I want to finish a few more unrelated tweaks tonight, but I will put together a beta build for you to test and let you know when it's ready. Once you've verified that looks better, I'll close out this issue. |
It seems great, just ping me when a new release candidate is available and i'll then test this in my environment as soon as possible. |
Any chance to get a release soon ? even a beta/rc one ? |
Yes, sorry! I've been caught up with work these last few weeks, but I should be able to tag a new release by Wednesday morning. |
Hey, I know I'm late, but I've got a version that I'm going to play with a bit this evening and then tag and release as |
Thanks ! No problem, take it easy :) |
Hi @Toilal, I've just tagged and released Definitely let me know if it doesn't fix the issues you've described or if you run into any other issues. Thanks again for your help! |
I gave a first try and it seems really awesome now ! Issues on windows are now fixed, and it's definitively the best replacement option for Unison :). First sync was as fast as a git clone, and new monitor is brilliant too ! Good job ! Is there any option/configuration to enable faster change detection on the windows side, based on filesystem notifications ? Initial synchronisation is damn fast, but when working on files, it has some delay (a few seconds) before the file change is propagated on the other side. Does
anyway I'll still try to use it on my actual dev projects, and if everything is ok i'll try to write a Vagrant plugin to implement SyncFolder with mutagen. |
Hey, thanks for the initial feedback. Please feel free to report any issues, no matter how small. If things aren't simple and functional, then they aren't working correctly. Right now the native file monitoring is only used on Windows if the path is a subdirectory of the user's home directory. The reasons for this are outlined here, but I've discovered an unrelated issue on macOS, so I will try to put in time to remove this limitation over the weekend. Please stand by for more information.
Thanks again for your input! |
Hi @Toilal, I've just pushed out |
The aforementioned Windows filesystem watching caveat has been fixed in |
It seems mutagen doesn't support sync from windows to linux because chmod is not supported on windows.
It also cause problems with symbolic links.
See the following status, Alpha is running Windows and Beta is running linux.
"unable to ensure path does not exist: path exists" => Symbolic links
"unable to set file mode: chmod C:\devel\projects\AFB-oison\abc252047704: not supported by windows" => New file created on Beta (linux). chmod should be ignored on windows, or only set readonly if "w" flag is missing on the linux counterpart.
It also creates a bunch of files when it fails, it seems temporary file is not removed when those failures occurs.
I'll be glad to contribute with a Pull Request for this issue, but I never wrote anything in Go lang.
The text was updated successfully, but these errors were encountered: