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
cgroupsv2 issue with ~/.config/container/libpod.conf #3976
Comments
One possible solution would be to add a new flag to the libpod.conf file Then if the file exists and does not have this flag, we change the default runc to crun the first time we run podman, with a warning message on the screen. Then add the flag. When runc gets support for cgroupsv2 users can change their libpod.conf file and use it, and podman will leave it alone. |
My initial impression is that we really need to replace We could make |
Just a scope question. This is only a problem if you upgrade to F31 from a lower level right? If you do a new clean install, then libpod.conf gets generated appropriately right? Can/should we just document the heck out of it? I'm be worried about what happens in debian, ubuntu, etc if we did the |
Yeah, this is basically only for upgrades, and even then only until |
I think we could handle this with a check to see if machine is booted with cgroupsV2 support, has crun installed and does not have the flag. I agree this is just a stop gap so that we don't blow up all users of Fedora 31. I think most people upgrade or at least share the previous used homedir. |
Maybe Podman should not write out a |
I agree, we should not be copying the file. I think this was put in so that users would do the correct thing in the local config file. But it locks us in. I think it would be better to get the code to merge the system defaults with user overrides in the homedir. Then we could just initialize a empty libpod.conf in the users homedir. And only do overrides if the user modifies it. But we still need to handle this upgrade. |
if we can detect at runtime whether the systems has cgroupsv2 support, why modify the config file at all? Why not just print a warning that cgroupsv2 has been detected so we're using crun instead of runc, and do it? That's 'transient' behaviour which is much easier to modify later, and doesn't involve poking the user's home directory. |
There is precedent for doing what @AdamWill suggests. If you modify Podman storage settings and they differ from the DB, we print angry log messages telling you that you've specified a configuration that would break Podman, and ignore what you specified to use the cached DB configuration. I really dislike the idea of overriding Counterpoint: If I had a CGroupsV2 enabled |
the general idea would be once such a runc is available we revert the podman behaviour so it doesn't override the setting any more. if you're testing such a runc before it's widely available, i guess patch podman locally yourself :/ |
This should be fixed now. |
We are going to have a problem in Fedora 31, where we are changing the default of the OCI runtime from runc to crun. We have to do this because runc is not ready for cgroupsV2 support. The problem is each rootless user and toolbox user, has a libpod.conf file that was automatically generated in their homedir, via the podman command. This conf file has hard coded default to use runc, so once you upgrade into Fedora31 your podman rootless containers will blow up.
Simply
rm -f ~/.config/containers/libpod.conf
will fix the problem. Podman will then regenerate the file with the current Fedora 31 defaults (basically crun as the oci runtime.).Another option would be for the user to edit the
runtime = "runc"
line, to:
runtime = "crun"
Bottom line, is I believe we need to fix this in the podman command.
The text was updated successfully, but these errors were encountered: