Skip to content
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

Bind mounted filesystem not reporting filesystem changes (perhaps) #739

Closed
richardj-bsquare opened this issue Oct 19, 2023 · 9 comments
Closed
Labels
t/question Further information is requested

Comments

@richardj-bsquare
Copy link

richardj-bsquare commented Oct 19, 2023

Describe the bug

This has happened in a couple of scenarios, but the most reproducible example I have so far, has been using a dev container via VScode.

In my example, I created a 'hello world' rust program within a 'Rust' dev container. I then proceeded to produce a dev and release build. I was examining the file sizes and noticed that occasionally when manipulating the optimisations in the release build nothing changed with respect to file sizes in the explorer view for the binaries.

Attached is a screenshot where I did the following:

  • I had a release build and explorer showed said 'release' folder (panel on left-side).
  • I deleted the 'release' folder using explorer (folder is deleted and disappears from panel).
  • I confirmed it was gone using ls in the shell
  • I re-built the release.
  • I noticed that the release folder hadn't appeared in explorer.
  • I opened a shell and listed the contents of the target directory.
  • I took the screenshot

I tried the same operation with Docker Desktop and the explorer view immediately reflects the changes to the underlying FS.

Restarting Orbstack and the changed file sizes would suddenly appear.

I'm guessing this could be related to filesystem notifications not being passed through correctly (inotify?)?

I'm happy to provide any required further details or diagnostics if and when this happens again, just let me know what.

I've also had a similar problem outside of VS code where I bind mounted my .ssh directory into a bare ubuntu:latest container. I then added a file to the .ssh directory via the host, and the file did not appear within the container when I did an ls of the bind mounted directory. Again restarting Orbstack seemed to clear the problem for a while.

To Reproduce

No response

Expected behavior

Bind mounts to correctly report filesystem changes.

Diagnostic report (required)

OrbStack info:
Version: 1.0.1
Commit: 0d4cdcf185489f992cf8e3187884f11f4feab1aa (v1.0.1)

System info:
macOS: 14.0 (23A344)
CPU: arm64, 8 cores
CPU model: Apple M1
Model: MacBookPro17,1
Memory: 16 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2023-10-19T10-24-48.380816Z.zip

Screenshots and additional context (optional)

image
@richardj-bsquare richardj-bsquare added the t/bug Something isn't working label Oct 19, 2023
@rguennichi
Copy link

rguennichi commented Oct 19, 2023

I can confirm that we have the same issue as well! changes (volumes) are not mounted/sync correctly in containers

@victormech
Copy link

I also have the same problem. I am using PHPStorm and a similar setup as the post author.

@kdrag0n
Copy link
Member

kdrag0n commented Oct 19, 2023

Are you all on macOS 14?

@rguennichi
Copy link

@kdrag0n I'm on macOS 13.6 - M2 Max - OrbStack Version 1.0.1 (16297)

@victormech
Copy link

@kdrag0n Similar setup for me here. macOS 13.4.1 - M1 Max OrbStack Version 1.0.1 (16297)

@kdrag0n
Copy link
Member

kdrag0n commented Oct 21, 2023

This isn't an OrbStack issue. The Rust Dev Container image includes a setting to exclude target from file watching for performance reasons. You can override this in User settings.

Screenshot

node_modules is also excluded, so I wouldn't be surprised if other images have similar settings.

If you're seeing similar behavior in other contexts, please share a new reproducer, or at least details. I wasn't able to reproduce the issue by mounting ~/.ssh in a container.

@kdrag0n kdrag0n added t/question Further information is requested and removed t/bug Something isn't working labels Oct 21, 2023
@richardj-bsquare
Copy link
Author

K. Thanks @kdrag0n for spotting this. I'll try to see if I can get the .ssh issue to happen again and raise a separate issue if so. I think this can be closed on this basis.

@kdrag0n
Copy link
Member

kdrag0n commented Oct 25, 2023

Great. @rguennichi I noticed that you deleted your comment about PHP mounts, but let me know if that's still an issue.

@rguennichi
Copy link

@kdrag0n Thanks for the remind.
But I found that the reason was linked to opcache that was enabled on dev environment in our services. So there are no issues anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants