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

Nested volume mounting behaviour is not compatible with Docker #418

Closed
ningziwen opened this issue May 26, 2023 · 2 comments · Fixed by #524
Closed

Nested volume mounting behaviour is not compatible with Docker #418

ningziwen opened this issue May 26, 2023 · 2 comments · Fixed by #524
Assignees
Labels
bug Something isn't working

Comments

@ningziwen
Copy link
Member

Describe the bug
There appears to be a behavior mismatch between Finch and Docker in the handling of nested volume mounts. In Docker, a nested volume within another volume is correctly accessible, while in finch, the same nested volume fails to be accessible and returns an error "No such file or directory".

Steps to reproduce

finch run --rm -it -v /tmp/test-1/test-2:/test-1/test-2 -v /tmp/test-empty:/test-1 public.ecr.aws/amazonlinux/amazonlinux:2 bash

In bash,

ls /test-1/test-2

The 'ls' command results in the following error:

ls: cannot access /test-1/test-2: No such file or directory

Expected behavior

In Docker, it can return the correct content under test-2. The compatibility with docker is expected.

Additional context
Nerdctl issue: containerd/nerdctl#2254

To help debug the issue as quickly as possible, we recommend generating a support bundle with finch support-bundle-generate and attaching it to this issue. This packages all Finch-related configs and logs into one file.

@ningziwen ningziwen added the bug Something isn't working label May 26, 2023
@ningziwen
Copy link
Member Author

In parallel of working on the fix in Nerdctl, trying to make a temporary fix change under FINCH_DOCKER_COMPAT env var to help Finch users unblock themselves immediately.
#417

ningziwen added a commit that referenced this issue May 26, 2023
Issue #, if available:
#418

*Description of changes:*
Sort volume args in DOCKER_COMPAT mode

*Testing done:*
Unit tests and new e2e tests.
runfinch/common-tests#66


- [ X ] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Ziwen Ning <ningziwe@amazon.com>
@ningziwen
Copy link
Member Author

The fix in Nerdctl is merged. containerd/nerdctl#2255

ginglis13 added a commit to runfinch/common-tests that referenced this issue Aug 8, 2023
*Description of changes:*

nerdctl released v1.5 and we saw some test regressions in
runfinch/finch#521:

* compose container suffix changed
* cp now works with stopped containers
* nested bind mounts issue resolved

Follow up PR after in finch to remove `FINCH_DOCKER_COMPAT` env
variable: runfinch/finch#418

Issue #, if available:



*Testing done:*

pulled down runfinch/finch#521 locally, `replace` directive to point to
local common-tests, `make test-e2e-container`

- [X] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
ginglis13 added a commit that referenced this issue Aug 11, 2023
Issue #, if available:

Closes #418 

*Description of changes:*

with release of nerdctl v1.5 we can remove the FINCH_DOCKER_COMPAT
environment variable used as a workaround for nested volume mount
behavior.

*Testing done:*



- [x] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant