-
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
MacOS improvements #13409
MacOS improvements #13409
Conversation
pkg/machine/qemu/config.go
Outdated
UID int | ||
} | ||
|
||
// GetUID is helper function to get the userid that should be |
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.
Should we have a GetGID?
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.
i dont think we need it r/n, but we can in the future
Output when applying the PR commit to the
@baude is this kind of error related to upstream or a nix quirk? Does it mean that mounting volumes is going to need to be rootful going forward if the UID is being passed through this way? @zowoq is there a reason that the GetUID stuff added in this PR would be failing for nix alone? |
I wouldn't have thought there would be any nix specific problems with that. |
cfc2cb1
to
ac5bbf1
Compare
@willcohen that is now fixed ... it took me a bit to try and find root cause plus implement a fix. |
Very nice work. I already used this in combination with the patched QEMU from #8016 (comment) to run a container with volume mounts and it worked like a charm:+1:. The only unresolved issue is that I can't run containers built on X86 without first manually installing |
for those playing along ... my testing environment is based on ...
|
f88fd7e
to
5520dce
Compare
Right now I mount my user dir the following way: volumes:
- ./app:/app because it is missing the I tried to solve that by mounting my user dir at the root dir with podman machine init -v /Users:/Users:ro
podman machine start
# Now it works
podman machine stop
podman machine start
# fails with mkdir /Users Operation not permitted It fails here: What is the reason for this? Is the first connection always done using root and afterwards with the core user? In the end, that would allow me to use one docker-compose file with docker-desktop, colima and podman. |
Yes, this is something we need to discuss as a team tomorrow. While I work on the weekend, there is no expectation that the rest of the team do so. We have a couple of behaviors that we need to iron out. Moreover, we have only so much wiggle room in 4.0 because it has already been released. I expect this to be smoothed out by 4.1, but figured people would be happier if they had something that mounted. |
@baude Thanks for the quick answer. Just as an additional input: I just checked my colima installation and it seems like they mount |
how does /home/core/host strike you? |
@baude I like that. Does that solve the prefix issue though? |
Why not just check if the directory exists before doing the mkdir -p? Or does that mean it's not successfully unmounted on stop? |
@LionsAd I did not write that code. It was contributed by a wonderful member of the community. As Podman Architect, I need to understand and value the intent of the submission as well as keep into account what the Podman team wants to do ... and don't forget balancing also what the community wants. Like I have said earlier, we have very little wiggle room on how much we can do here in this version. We can do a lot more for Podman 4.1. |
/lgtm |
/lgtm |
hold off on merging this ... need to see if i can squeeze in a fix for subsequent mounts. |
* Enable support of virtfs in Podman and darwin. At the time of this writing, it requires a special patch not yet included in upstream qemu. * Prefer to use a specially built qemu to support virtfs. The qemu is installed under libexec/podman. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <[email protected]>
@baude what was the problem with subsequent mounts? |
in fcos, / is immutable. so on reboots, they get removed. this will be something we improve in 4.1 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude, rhatdan, willcohen 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 |
I should note that I still get the following error when using the latest version of this PR, but the directory does in fact mount, so I'm not totally sure that there's actually still an issue, and it seems like the functionality is there. The
|
/lgtm |
I tried this out on my M1 mac with And I saw the content of test directory, very cool. |
/hold cancel |
hey, can we expect this in the 4.0.x versions or only in 4.1 ones? As volume mounts functionality on mac is the last pain point in the docker migration for me |
4.0.2 should have volume support for MAC. |
Signed-off-by: brent baude [email protected]