-
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
Implement Windows volume/mount support #13908
Conversation
7f393f4
to
3b9e0d2
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: n1hility, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM, once c/common is vendored |
@rhatdan @TomSweeneyRedHat @Luap99 Here is the updated PR that drops the config updates and instead uses the marker file like discussed on containers/common#1005. However, this update does touch the libpod networking code. To make it easier to review I broke this off in another commit here: 6a44a43 I also did not update the mac code to use the new marker yet (still using the supported config value), i figured it would be better to follow-up immediately with a small update for that than to shove too much in here. Let me know if you prefer me to add it, and I can include that. |
/hold PR has merge conflict |
Also my other comments see above are not addressed. |
thanks for the great feedback I will turn this around quickly (and sorry for the missed call - great catch!) |
PR Updated to resolve feedback, marker code moved to common here: containers/common#1012 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you create the podman-machine file for the qemu backend as well since we consider the config file option deprecated.
Sure. I was originally planning to do this in a follow-up PR to keep it easier to review, but will go ahead and throw that in. |
ec69d4a
to
fcde02f
Compare
/unhold |
Signed-off-by: Jason T. Greene <[email protected]>
Based on WSL2 9p support: remaps windows paths to /mnt/<drive> locations for both podman and Docker API clients. Signed-off-by: Jason T. Greene <[email protected]>
PR is rebased and updated to latest main of config/common which includes the just merged containers/common#1012 |
"github.com/pkg/errors" | ||
) | ||
|
||
func isHostWinPath(path string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible to get unittests on these functions to avoid simple regressions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baude these are tested via specgenutil_test which I originally had to do for API access reasons. Although, I think those reasons may no longer apply. I can see if I can move them to specgen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baude ah yes, it creates an import cycle that was the other reason they had to be in the other package.
/lgtm |
Based on WSL2 9p support: remaps windows paths to /mnt/ locations for
both podman and Docker API clients.
For example:
podman run -it -v C:\Users\Jason:/blah ubi8-micro sh
Additionally unixified paths sometimes used by Docker clients are supported
podman run -it -v /c/Users/Jason:/blah ubi8-micro sh
This also works with mount paths:
.\docker run -it --mount 'type=bind,source=C:\Users\Jason,destination=/blah' alpine sh
Finally, windows paths can be used on Linux in the WSL session to enable workflows where users are running process under the native Linux prompt yet accessing data on their Win drives.
This code is only active if either the podman-remote client is windows (in which case there is client side path remapping), or if the podman backend is configured as a WSL machine. The latter is necessary since there are parsing ambiguities (see tests) when interpreting potential win paths. While in practice they are uncommon, ideally existing behavior is preserved and the new code paths are only active where needed.
Resolves #13707
Depends on containers/common#1012
Signed-off-by: Jason T. Greene [email protected]