-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman rejects duplicate mount specifications #4217
Comments
I don't believe we strive to be bug for bug compatible with Docker. To me this is a bug and should be reported to the user. Docker should also report an error. |
Docker does allow for duplicate mount destinations, but only so long as the mounts are completely identical. I think this might be reasonable to do - reopening. |
Why? What would be the reasoning for allowing to volumes to be exactly the same, other then a bug? |
Sorry for the delay, #4462 to fix |
Docker allows exactly identical mounts and volumes to be passed without throwing an error. If a volume is exactly identical, we should not error - otherwise, we'll still give a duplicate mount destination error. Fixes containers#4217 Signed-off-by: Matthew Heon <[email protected]>
I reject this as a bug. We don't have to be bug for bug compatible with Docker. Ignoring this might leave a caller confused because of a typo. It is better to report the error. |
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days. |
With 4462 closed, I think we'll just close this as NOTABUG. |
Works for docker because docker allows duplicated mount volumes, but podman doesn't: - containers/podman#4217
Works for docker because docker allows duplicated mount volumes, but podman doesn't: - containers/podman#4217
To accommodate machine-generated YAML or API calls, such as with Thus, this issue is breaking the new, exciting This constrains shops/teams who want to adopt Podman but keep the developer experience consistent. Many developers use Compose for their dev environments, and it's a nice way to include Windows/Mac devs who don't want to run a Linux VM to use Podman. One could argue that But in practice, I wonder if it's more valuable to make a concession and, as long as keys are truly identical, ignore it. This course of action looks like the least work for tooling interoperability, since there is already a pull request |
Could you open a new issue. I think with the compat layer, we should fix this. I am not sure if we want to fix it as deply as we did in the first PR. |
Concur with this being a separate issue. We have no intention of fixing this for the Podman CLI. For the Docker-compat remote API, which did not exist when this issue was originally created, we have a stronger compatibility guarantee, so we'll have to fix it there. I will note that this is not the only thing preventing Compose v2.0 from working (there were a rash of changes to how images were built, which are substantially trickier; we're going to look into them, but I doubt we'll have time before the new year at earliest, most of the team is busy on the network rewrite to get Podman v4.0 out the door). We strongly recommend downgrading to Compose v1.x, which does work, until we can get Compose v2.0 working. |
FYI: the compose compatibility issue is being tracked here #11822 |
Hello this issue happen on last upstream too, /tmp: duplicate mount destination |
Yes, and we have no intention of fixing it in the CLI as, in our eyes, it's a bug in Docker. For the Docker-compatible API, we will fix it, as we guarantee bug-for-bug compat there; this has not been done yet. |
Thank you very much for the reply, i will go to bother docker to fix this issue XD. |
Big fan of podman here. However, this has got to be one of the weirdest bug reports I've seen thus far.
😐 |
@rcannood you think we should not report a problem with the same mount specified in the command line multiple times? |
Thanks for asking me to elablorate! If podman was something that was developed completely separately from docker, I think the current approach 100% makes sense. But that is not the case, and many people (including me) first started using podman as a drop in replacement for docker. I don't think this is an issue for direct users of podman as they can simply edit their command. The issue mostly arises when dealing with other tooling software (such as docker compose, such as nextflow, such as viash) which attempt to auto detect mount paths from a set of input files. If those input files originate from the same directory, they might mount the same directory multiple times (with exactly the same source and destination paths). Users of those tools cannot use podman instead of docker, or have to file bug reports to the maintainers of those tools to get them to solve the issue. In my opinion, it would be great if podman could produce an error when there are conflicting mount paths (i.e. multiple source paths to the same dest path) but only generate a warning when the same src:dest specification is provided multiple times. That way, existing scripts and tools still work with podman even when they forget to remove duplicate mount paths. |
That seems reasonable to me. Care to open a PR for this? |
Also create one constant for ErrDuplicateDest, rather then have the same value set three times. Fixes: containers#4217 Signed-off-by: Daniel J Walsh <[email protected]>
Aha! I was wondering whether you meant that I should open a PR. I was about to look into this, but I see that you already made the necessary changes and that it was even already merged into the main branch. Thanks a ton @rhatdan for being so open-minded on this :) |
Yes I had some spare cycles to work on it, so I figured I would knock it out. Thanks for reporting. |
Also create one constant for ErrDuplicateDest, rather then have the same value set three times. Fixes: containers#4217 Signed-off-by: Daniel J Walsh <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman rejects duplicate mount specifications in the run command, contrary to docker
Steps to reproduce the issue:
Describe the results you received:
Error: /home/avi: duplicate mount destination
Describe the results you expected:
Successful execution of the container with the mounts deduplicated
Additional information you deem important (e.g. issue happens only occasionally):
The duplicate mount specifications were generated by a script. I could deduplicate it, but I believe full command line compatibility is the goal.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
None
The text was updated successfully, but these errors were encountered: