-
Notifications
You must be signed in to change notification settings - Fork 356
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
Avoid operation not supported mounting failure on macos #1146
base: devel
Are you sure you want to change the base?
Conversation
As `:Z` mounts are usually not available on MacOS, we avoid adding that label. Fixes: ansible#1145
Would it be better to try relabeling and then fall back to no labeling on ENOSUP? That way in the future if Mac gains labeling (virtiosfsd has some support) then it will work in both cases. |
@rhatdan We start containers quite often, so having a retry approach would have impact on performance and also clutter the logs with retries. IMHO, I would just make another release once podman starts having support for Another interesting question is if we really need It is true, that I could also look for which is the current container engine and do the trick only with docker as current change modifies both podman/docker. |
This change would also break valid scenarios where relabeling is required, eg where the default target of a And yes, disabling it on Linux will break anyone using rootless containers on a default Fedora or RHEL setup since SELinux is enabled and enforcing by default. I actually very much dislike the fact that runner is rewriting user-supplied mounts at all, but since it doesn't currently distinguish between its own injected mounts and the user-supplied ones, I guess this shouldn't be a surprise. It's already moving away from the need for injected mounts anyway for the callbacks, so maybe we just need to double down on that and take the performance hit to copy the project in instead of mounting it. Longer-term discussion, I suppose... |
AFAIK, there is not mounting support when using real podman-remote (different hw machine), so I am not sure how runner would work with that. I think that we need to make a (big) difference between a random linux machine (vm or not) and the I would never dare to tell a linux user to disable selinux on his on servers or workstations. But on the other hand, I can see how we might need to customize the podman-machine-default to make it work out of the box. From the extension point of view, we will never be able to use copy instead of mount as we run lots of commands, the penalty would be so big that would render the extension unusable. But the funny bit is that the extension is not affected by the mentioned issues, as we do only mount the code, without all the extra bigs done by runner. It should be noted that only one of the 5-6 mounts done by runner had the In fact I observed that removing the :Z was enough even without having to disable selinux inside the podman-machine. To summarize, this is what I think we should look into:
|
As
:Z
mounts are usually not available on MacOS, we avoid adding that label.Fixes: #1145
Related: containers/podman-compose#509