-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Symlinks don't work on podman machine on macOS Monterey when using volumes feature #13784
Comments
@baude PTAL |
Podman 4.0.3 is not a supported release imho. Where did it come from? |
@baude as I mentioned in my original post, it came from |
Symlink issues noticed with lima as well: lima-vm/lima#726 |
I ran into the same problem using a Python Poetry project with the VS Code remote containers feature. I haven't looked in depth into the volume configuration but I had a |
same issue with use pnpm /var/workdir # ls -l
total 0
ls: ./gulp: cannot read link: Device timeout
lrwxrwxrwx 1 501 root 36 Oct 24 2019 gulp
ls: ./pnpm: cannot read link: Device timeout
lrwxr-xr-x 1 501 root 36 Mar 5 2021 pnpm symlink is: lrwxrwxrwx 1 xxx xxx 36B 10 24 2019 gulp -> ../lib/node_modules/gulp/bin/gulp.js
lrwxr-xr-x 1 xxx xxx 36B 3 5 2021 pnpm -> ../lib/node_modules/pnpm/bin/pnpm.js |
A friendly reminder that this issue had no activity for 30 days. |
Is the symlinked directory mounted into the VM at the same location? |
Yes |
If you podman machine ssh, does it look like the symlinks are correct? |
No / not possible to tell
It should be pointing to a file in the parent dir (here's the output from my Mac)
|
This seems to be due to the choice of 9p security model. If you change The documentation of the purpose and behavior of the different security models seems to be rather light: From testing, it appears that the This is consistent with the information noted here: For the podman machine, unless anybody has a better idea, I suggest making the security model be configurable. Using |
I am not sure, but I remember 9p not mapping correctly attributes when no authentication was used. Although I can be wrong. At the moment I was testing something similar with py9p though no conclusion yet. So yes, |
Sorry for the noise above. I wish github wouldn't do that until there's a PR. This is work in progress. |
I have posted a PR for this. The change makes the security model configurable but does not change the default. I'd vote for changing to default value to |
SGTM, we can look at changing the default in 5.0, We should also have this default exposed in containers.conf. |
That was the design, indeed. |
I hit this problem as well with podman on mac, trying to build the OpenShift docs - they use symlinks extensively. For anyone who lands here with the same issue, I followed the instructions here as a workaround: How-to: Getting Podman to Correctly Mount a Native Folder on a Mac |
Originally changing from virtfs to sshfs was a feature (like in lima), but it was dropped during the integration... The recommendation is still to use a local filesystem (named volume), instead of a remote filesystem (mount) |
Recent podman git has a better way to do this; I presume that will be included in the next release. |
@bugfood that only changes the virtfs options, it doesn't really change driver (like in that Medium article). There was a comment:
It was a change in CoreOS, to allow empty directories (as mountpoints) in the (read-only) root. Previously (when the code was written), you were not allowed to change anything but Mounting /tmp could still have interesting side-efffects, many assume that to be local (or tmpfs) |
What I mean is that the change makes 9p usable for this use case (and requires much less configuration than sshfs). Is there an advantage to using sshfs still?
Thanks, that makes sense in retrospect. |
I think that sshfs is mostly a fallback, where virtfs is not available (such as CentOS 7 guests or Windows hosts). The way forward will be virtiofs, anyway... Just that your virtfs comment was after a sshfs post. |
Workaround for those waiting for the next release with built-in support for this:
Symlinks now correctly resolve. |
A friendly reminder that this issue had no activity for 30 days. |
Thank you for the reminder. Anyway I think this can be closed? |
I think we might have to reopen this bug because as of today (4.2.1), symlinks are broken. I wrote more about the issue on #16102 Hacking the vm to make them work is not really what I would expect from users. Is there a way to create the machine from start with correct security_model? On my machine, i see |
I'm experiencing a similar issue when attempting to build a NodeJS project which uses a
The error occurs with both |
I believe the default is being changed to that. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Symlinks don't seem to work on podman machine on macOs Monterey with volumes. Any attempt to interact with symlinks ends with the following error:
This bug prevents me from using podman, because my project uses pnpm which extensively uses symlinks.
Steps to reproduce the issue:
brew install podman
podman machine init --volume /Users
podman machine start
Create some symlink on host machine e.g.
ln -s ~/some_dir/ /Users/my_symlink
podman ssh
(inside podman machine VM):
ls /Users/my_symlink
=> results in an errorDescribe the results you received:
Error
ls: cannot access '/Users/user/some_directory': Timer expired
Describe the results you expected:
Symlinks work exactly as they do on the host machine.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
physical, MacBook
The text was updated successfully, but these errors were encountered: