-
Notifications
You must be signed in to change notification settings - Fork 260
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
Add cgroup v2 support #1072
Comments
Note that Docker for Mac recently switched to cgroup v2 as well. |
Hi, my sysadmin refuses to install DOMJudge if it does not support cgroup v2. Are there any plans to upgrade DOMJudge? |
We have looked into this already but it is super non trivial. The API changed and some stuff is hard / not doable, so we need to investigate. I don't think it's on a timeline anytime soon. |
Unfortunately, it looks like we currently have to wait until |
I was mistaken, cgroup v2 support is partially available libcgroup v2.0. |
systemd v255 (currently in rc3 or something) will officially remove cgroup v1 AFAIK, so from now on, DomJudge won't run anymore on up-to-date systems. |
Hi, I wanted to ask if it is soon planned to support cgroups v2, as the deprecation of cgroups v1 is coming closer... |
The coming months we are not planning to implement larger/harder features. As far as I'm aware (but didn't do extensive research on the subject) we can still use cgroupv1 as it is still supported with the kernel but only systemd will not support it anymore. Do you have more information on the subject? The main issue is that not all needed features are implemented in CGroupV2 so we can't do a 1 to 1 translation. According to the kernel (https://github.com/torvalds/linux/blob/b401b621758e46812da61fa58a67c3fd8d91de0d/tools/testing/selftests/bpf/cgroup_helpers.h#L32) cgroupv1 is still tested for. |
Pull requests adding cgroupv2 functionality are of course welcome! |
I have a WiP port of runguard to cgroupv2 https://github.com/Johnnynator/domjudge/tree/cgroup
The only major difference I noticed was that
Anything before v3.1 has bugs that would need workarounds in the code. |
Thanks for this! We will look into your code to see what we can reuse (and of course credit you if we do). |
This is unfortunate but gitlab seems to have enabled cgroups v2 on their runners and we still use cgroups v1, see DOMjudge#1072
This is unfortunate but gitlab seems to have enabled cgroups v2 on their runners and we still use cgroups v1, see DOMjudge#1072
This is unfortunate but gitlab seems to have enabled cgroups v2 on their runners and we still use cgroups v1, see DOMjudge#1072
This is unfortunate but gitlab seems to have enabled cgroups v2 on their runners and we still use cgroups v1, see #1072
systemd/systemd#31442 will be included in systemd v256. Maybe we should ramp up cgroups v2 support... |
I think we should wait for #2344 before implementing this. |
Do you know what these bugs / required workarounds are? It looks like both Ubuntu 24.04 and debian testing have libcgroup-dev 2.0.2 :-/ |
One was missing integration with systemd slices/scopes ( cgroup delegation ). There were also a few functions that did still expect v1 internally, and if my memory server me correct, it was something in the core part of the library that couldn't be worked around externally (I can check next week if I have some notes about this on my $work machine). Linking against a newer statically compiled libcgroup is probably the easiest option. |
Recently upgraded my Arch, which includes systemd v256. My boot sequence now takes 30 seconds longer than usual, thanks to https://github.com/systemd/systemd/pull/31442/files#diff-03b3e8b6554bb8ccd539ad2e547d9ef13f80428101bdc01b4d6e9ea5f685fe7cR3032-R3033 😅 log_full(LOG_CRIT, "Legacy cgroup v1 support selected. This is no longer supported. Will proceed anyway after 30s.");
(void) usleep_safe(30 * USEC_PER_SEC);
Does this work if the base system does not run the latest systemd? For reference, Ubuntu 22.04 (jammy) runs v249, Ubuntu 24.04 (noble) runs v255, Debian 11 (bullseye) runs v247, Debian 12 (bookworm) runs v252 |
lol, what an interesting strategy to annoy users Anyway, I have cgroups v2 working locally and on github actions, but I need to clean up the code. I will do that soon and send a PR. |
I also ran into this now, but because of less frequent updates for me it didn't hang for 30s, but just refused to boot. (Yes, hanging is a good way to warn users after all.) For me, the fix was to remove the Looking into this, the |
This is unfortunate but gitlab seems to have enabled cgroups v2 on their runners and we still use cgroups v1, see DOMjudge#1072 (cherry picked from commit cb9e1a7)
This is unfortunate but gitlab seems to have enabled cgroups v2 on their runners and we still use cgroups v1, see DOMjudge#1072 (cherry picked from commit cb9e1a7)
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes #1072. Also move our integration tests from broken gitlab to working github actions.
Fixes DOMjudge#1072. Also move our integration tests from broken gitlab to working github actions.
Fixes #1072. Also move our integration tests from broken gitlab to working github actions.
Fixed in #2588? 😄 |
Indeed 🎉 |
Hi, currently runguard is using libcgroup to manipulate cgroup creation and controller settings. But some distributions are moving to cgroup v2:
Fedora https://www.redhat.com/sysadmin/fedora-31-control-group-v2
RHEL https://www.redhat.com/ja/blog/world-domination-cgroups-rhel-8-welcome-cgroups-v2
Archlinux https://wiki.archlinux.org/index.php/cgroups#Enable_cgroup_v1
It will be nice if we have cgroup v2 support at future. libcgroup seems not to be supporting cgroupv2 in their C API, but since the file structure is unified, it shouldn't be too complex to just creating directories in cgroup's VFS.
The text was updated successfully, but these errors were encountered: