-
Notifications
You must be signed in to change notification settings - Fork 285
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
Mounts stop receiving inotify change events from host under 2.2.0.0 #5701
Comments
Thanks for the report. I believe it is the same as #5530, so I'm closing it as a duplicate. |
As a matter of fact I’ve been running your reproduction steps against our latest release candidate build for about half an hour and I’m still seeing the events in the compose output! |
@mat007 is that RC build available for download? |
This issue was fixed for me after installing 2.2.0.4. Thanks for the hard work! |
Great, thanks for the feedback, @ezk84. |
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. |
Expected behavior
File change events from editing in the host should propagate to the container to enable tools like
modd
,nodemon
orwebpack
to re-compile files in-container.Actual behavior
Changes generally trigger recompilation but under the scenario of a subdirectory of a mount also being mounted on another container, change events stop propagating (in the example I outline below, it happens after about 20 seconds). Once that happens only re-starting the container works to restore desired behaviour (for a few seconds more).
Information
Reproducible. Only happens when
/dir
is mounted in one container and/dir/subdir
is mounted in another. Both mounts exhibit the same behaviour.After more investigation, I've seen that the order in which the containers start is relevant. I can reproduce it consistently when the container mounting the top-level directory starts after the one mounting the subdirectory.
I can reproduce in the official 2.2.0.42247 release as well as the private build (2.2.0.1.42579) that tries to address issues with the new bind mount implementation (from #5532, #5540). Interestingly, the contents of the file in the container reflect what I expect, but not the events that fire.
Steps to reproduce the behavior
Using git-bash shell
mkdir -p dir/subdir
touch dir/one.txt dir/subdir/two.txt
docker-compose up
I=0; while true; do I=$(( $I + 1 )); echo "Change $I!" | tee -a dir/one.txt; sleep 10; done
Change n!
lines in the other shell, and then stop.docker-compose exec dir tail -1 one.txt
reveals all lines are there.The text was updated successfully, but these errors were encountered: