-
Notifications
You must be signed in to change notification settings - Fork 287
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
NTFS junctions don't work with Fuse filesharing #5582
Comments
Thanks for the report @KevinVonJocoon. I've done some experiments. I'm not exactly sure I've got the same symptoms as you, but maybe I haven't completely understood your symptoms. I created both junctions and symlinks on the host file system and mounted the parent folder into the container:
I updated files within both link and target, in both container and host file systems, in both 2.1.0.5 and 2.2.0.0, and the file sync seemed to work correctly in both directions, and files got updated in both directories at once. With one big exception: the links are not followable within the container in 2.2.0.0, they just appear as broken files. Does this match what you are seeing, or is there a different problem? If you have something else, can you construct a small step-by-step repro case? Thank you. |
I haven't tried cases where only one side of the link is shared, that might have some different cases. |
Actually, I just noticed I forgot about our underlying project structure. Sorry for that - reproduction/base situation is as follows: We have a main git repository containing submodules, so the real structure looks more like:
and they're linked (NTFS-junctioned) like this: /volumes/src/modules/my-submodule-1 -> /.git/modules/volumes/src/modules/my-submodule-1 Which, in addition, is symlinked/junctioned by composer like: /volumes/src/vendor/my-submodule-1 -> /volumes/src/modules/my-submodule-1 Lets assume /volumes/src is the directory mounted into the container. (Please don't be confused by the fact we're also using "modules" as directory name inside our mounts (e.g. src/modules), which is, of course, not the .git/modules directory) I think you'll get the concept, though those links are making me crazy in my head, having a cold and I can't be sure those example links are even plausible. Hope it helps. |
OK, and just to be sure, the path on the left of the arrow in your example is the junction point, the one on the right is the target (where the files actually are)? What does |
Yes, it's like that. |
We have a fix for this, it will be released soon. |
We have a new private build that (we believe) fixes this bug. https://download-stage.docker.com/win/stable/42579/Docker%20Desktop%20Installer.exe. Please try it and let us know how you get on. |
Sorry to say this, the Build almost broke my colleague's system. File changes were almost randomly propagated. It seems most of the time an initial file change propagated correctly and anything afterwards broke files (seen as empty files in the container). Luckily, the changes did not propagate back to the host. Were you able to construct a reproduction case/test and evaluate it using your private build? |
Yes, we've reproduced it and we're pretty confident we have fixed it, we just wanted to give you the chance to check it too. I think the issue your colleague is seeing is #5530, which is not yet fixed. |
I am not sure if it's really the #5530 issue I am having. (I am the colleague he mentioned)
Sadly I can't produce any diagnostics, since I had to downgrade, because I wasn't able to work at all anymore locally (login form wouldn't even load) The reason why I think that #5530 isn't the issue here, is, that it worked on 2.2.0.0 (except for when you've changed a php file for example), so it seems it's an issue solely related to this 2.2.0.1 build. |
Update: This issue is not fully fixed. It works if the target of the junction is also mounted in the container, but not if it points outside. |
Any news on this? Estimate when this might be fixed? |
Sorry, no date yet. We're still looking into possible solutions. It's not a trivial bug fix, it will need some redesign. |
Version 2.2.0.3 release notes say it is fixing this issue:
Can someone confirm? |
@KingGoujian sorry it’s a typo, I believe the release notes should link to #5611 which is about symlinks. |
@KingGoujian or actually for junctions it’s partially fixed as @stephen-turner explained a few days ago:
If the junction targets a folder outside the mounts, then it doesn’t work at the moment. |
I was having the same problem and after upgrading to 2.2.0.3 have confirmed that new containers work, but my existing containers return the same error when I try to start them. Is there a way to fix those containers, or do they need to be rebuilt? A couple contain files that I would rather not lose. |
I have discovered a workaround if the target of the junction point is outside the volume mount but inside the same disk. In that case, if you share the junction point itself with -v, instead of the folder containing the junction point, everything will work correctly. Hopefully this will be useful to some people while we continue to work on it. |
Sorry for the delay getting back to you. I've got a development build suitable for testing: https://download-stage.docker.com/win/edge/43083/Docker%20Desktop%20Installer.exe It reports as version 2.2.2.0 (43083). It has prototype fixes for
If you have a chance to test the build, let me know how it goes! If something goes wrong, please describe what happened in as much detail as you can and please include diagnostics. |
Hi everyone, I'm just wondering if anyone who has junction points in their setup has had a chance to try out @djs55's test build. We would love to hear your feedback. Thanks. |
Works on my home setup. Created an environment to test it: https://github.com/KingGoujian/docker-volume-issue-with-junctioned-directory |
I was afflicted by this bug as well. The dev build resolves the junction issue for me. |
Am I correct to assume this issue is not resolved in the newest build 2.2.0.4 (43472)? It didn't say anything in the release notes about this. |
Correct. We decided the change was too large to include in a patch release. It will be in the next Edge release and the next full Stable release. |
This is now released in Edge 2.2.3.0, so I'm going to close this ticket. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
We're having a php composer project where we're symlinking local git repositories into the vendor dir of composer, e.g.:
src/vendor/codename/abc -> src/modules/codename/abc
(changed for human readability and to get the concept of mixing static composer deps with local dev projects using autoloading)
The directories are volume-bound with the whole project dir, so the "symlink" is a local NTFS junction automatically created by composer. We tested volume bindings with no option (default is :cached for the major project files), :cached, :delegated and :consistent - while we're still using :delegated and for local dev DBs, profiler data and logs.
While this still works on my Docker CE 2.1.0.5 on Windows, we just found out manually opening the same PHP file via nano in the container renders different results on later versions of Docker on Windows - though, in theory, it is the same file:
The latter one does not reflect changes performed on the host, while the first one does.
This just came to my mind: the new inotify-capability might not reflect NTFS junctions, local symlinks or something inbetween - which might be even a Windows issue?
Originally posted by @KevinVonJocoon in #5530 (comment)
The text was updated successfully, but these errors were encountered: