DOMjudge / domjudge-packaging

DOMjudge packaging for (Linux) distributions and live image
32 stars 39 forks source link

Judgehost docker container fails to start with latest docker versions #170

Closed spitzlei closed 8 months ago

spitzlei commented 8 months ago

Description of the problem

Since the update to docker 24.0.7 the judgehost container fails to start. No change in docker 25.0.0

judgehost-0-1  | [..] Setting up cgroups
judgehost-0-1  | mkdir: cannot create directory '/sys/fs/cgroup/cpuset/domjudge': Read-only file system
judgehost-0-1  | mkdir: cannot create directory '/sys/fs/cgroup/memory/domjudge': Read-only file system
judgehost-0-1  | chown: cannot access '/sys/fs/cgroup/*/domjudge': No such file or directory
judgehost-0-1  | bin/create_cgroups: 41: cannot create /sys/fs/cgroup/cpuset/domjudge/cpuset.cpus: Directory nonexistent
judgehost-0-1  | bin/create_cgroups: 42: cannot create /sys/fs/cgroup/cpuset/domjudge/cpuset.mems: Directory nonexistent
judgehost-0-1 exited with code 2

Your environment

Steps to reproduce

Expected behaviour

Judgehosts should run.

Actual behaviour

Container exits with message above.

nickygerritsen commented 8 months ago

We only support cgroups v1 for now and I think your host machine has cgroups v2. Can you follow these instructions to change back to v1 and see if that works?

spitzlei commented 8 months ago
cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-6.1.0-17-amd64 root=/dev/mapper/vg0-root ro systemd.unified_cgroup_hierarchy=0 cgroup_enable=memory swapaccount=1 quiet

I'm already running with cgroup v1 (and the system worked like that until the recent docker upgrades from 21.01.2024).

nickygerritsen commented 8 months ago

Hmmmm, then we need to investigate... We need to check if they maybe mount the cgroup folder differently.

nickygerritsen commented 8 months ago

I had the same issue after upgrading Docker, but https://github.com/DOMjudge/domjudge/pull/2317 seems to fix it. Can you verify by any chance?