-
Notifications
You must be signed in to change notification settings - Fork 944
bugfix: Fix CopyData in Bind Mount #2527
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2527 +/- ##
===========================================
+ Coverage 57.23% 69.22% +11.98%
===========================================
Files 278 278
Lines 18440 18442 +2
===========================================
+ Hits 10554 12766 +2212
+ Misses 6640 4216 -2424
- Partials 1246 1460 +214
|
|
Since we can reproduce the issue, |
|
BTW, can you add a test case to check the |
OK. Test case is added in the latest patch |
OK. Test case is added in the latest patch |
CopyData is an action which should be enabled only in mount volumes and images. For example: [root@hostname]# pouch run -it --name test2 -v /home/baijia.wr/volume/:/var/ docker.io/library/busybox:latest ls /var/ spool www [root@hostname]# ls /home/baijia.wr/volume/ spool www Without this patch, data is copied form container's dir "/var/" to host's dir "/home/baijia.wr/volume/", that is unexpected. So CopyData should be disabled in bind mount. Signed-off-by: Wang Rui <[email protected]>
|
LGTM |
CopyData is an action which should be enabled only in mount volumes and images.
For example:
[root@hostname]# pouch run -it --name test2 -v /home/baijia.wr/volume/:/var/ docker.io/library/busybox:latest ls /var/
spool www
[root@hostname]# ls /home/baijia.wr/volume/
spool www
Without this patch, data is copied form container's dir "/var/" to host's dir "/home/baijia.wr/volume/",
that is unexpected. So CopyData should be disabled in bind mount.
Signed-off-by: Wang Rui [email protected]
Ⅰ. Describe what this PR did
Data will be copied from container to host when bind mount is used, that is unexpected.
For example:
Data is copied form container's dir "/var/" to host's dir "/home/baijia.wr/volume/".
This patch will fix that.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
With this patch, DataCopy is disabled in bind mount.
Ⅴ. Special notes for reviews