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
Mounted dir file's not being sync #1148
Comments
sorry, I just removed OrbStack installation to try using Docker Desktop, and the Docker Desktop is updating the file in Real Time |
Please share a sample project to reproduce this. |
I faced a similar issue. In my case, I found that a bunch of commands I was running in a container watching for file changes weren't receiving events. I tested this with inotifywait in a container running under OrbStack and then on Docker Desktop (VirtioFS) using - inotifywait didn't receive any events under OrbStack - but worked as expected in Docker Desktop. I switched back to Docker Desktop for now and it works. I'll try and get a sample project to demonstrate. OrbStack info: System info: Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-05-02T11-45-05.303485Z.zip |
Here's sample reproduction steps. First, run an Alpine container that tails a file in a volume mounted from the host:
Then in the same directory run some tool to generate output, such as:
In Docker Desktop, the changes stream consistently: Whereas in OrbStack, the first write or two is detected, after which nothing appears in the volume until the writing process terminates: |
I attempted what @lieut-data demonstrated and I'm unable to replicate the bug there - however I am encountering this issue in my development work containers based on ubuntu and debian quite often. I have webservers that should hot-reload on code changes, and they don't restart on code change as it never gets pulled into the container despite being mounted in a volume. OrbStack info: System info: |
|
Okay extremely simple replication using python3: the key problem here seems to be what @codenoid mentioned around "closing the program that writes the file". Using two test scripts, the one where I open/close the file handler around each write successfully syncs into the orbstack-driven container. The one where I leave the file handler open, but use Shows volume sync bug: from time import sleep
with open('test.log', 'a') as fh:
for s in range(100):
sleep(0.25)
fh.write(str(s))
fh.flush() Does not show volume sync bug: for s in range(100):
with open('test.log', 'a') as fh:
sleep(0.25)
fh.write(str(s))
fh.flush() Then using
to tail inside the container and
outside the container, you can clearly see data synchronizing or not after running |
Yes, to clarify: we have no trouble reproducing that. It's the hot reload issues that we haven't been able to replicate. |
inotify issues are different; please open a new issue with steps to reproduce if you run into them again. |
Describe the bug
I basically mount a directory contains zerolog's Log file to a fluentbit container
when I see on the host version of the file, It's updated
but when I open fluentbit Directory (via OrbStack GUI), the file is not being sync with the host file
unless...
I close the program on the host that are writing to the file, then orbstack will update the file, and fluentbit will syncronize it
To Reproduce
No response
Expected behavior
the file should be being sync in realtime
Diagnostic report (REQUIRED)
OrbStack info:
Version: 1.5.1
Commit: 4cfac15e1080617c70eb163966e1cb2009dac1c2 (v1.5.1)
System info:
macOS: 14.4 (23E214)
CPU: arm64, 10 cores
CPU model: Apple M1 Max
Model: MacBookPro18,2
Memory: 32 GiB
Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-04-25T12-35-42.017309Z.zip
Screenshots and additional context (optional)
No response
The text was updated successfully, but these errors were encountered: