Moby shows a false error when running a real-time container. Despite enabling the correct settings and using cgroups v2, users may receive an error suggesting their kernel lacks support for real-time scheduling. The error message should be improved to help users who have configured their kernel correctly but still face issues due to unsupported cgroup v2 usage with real-time CPU scheduling.
Reproduce
Enable CONFIG_RT_GROUP_SCHED in your kernel configuration
Use Cgroups v2
Run the real-time container
docker run -it --cpu-rt-runtime=950000 --ulimit rtprio=99 --cap-add=sys_nice debian:jessie
Expected behavior
If you configure the kernel correctly but are using cgroups v2, attempting to create a real-time container should produce an error similar to the one you get when running the same container with Podman, which provides a clearer message
podman run -it --cpu-rt-runtime=950000 --ulimit rtprio=99 --cap-add=sys_nice debian:jessie
Realtime runtime not supported on cgroups V2 systems
Description
Moby shows a false error when running a real-time container. Despite enabling the correct settings and using cgroups v2, users may receive an error suggesting their kernel lacks support for real-time scheduling. The error message should be improved to help users who have configured their kernel correctly but still face issues due to unsupported cgroup v2 usage with real-time CPU scheduling.
Reproduce
CONFIG_RT_GROUP_SCHED
in your kernel configurationExpected behavior
If you configure the kernel correctly but are using cgroups v2, attempting to create a real-time container should produce an error similar to the one you get when running the same container with Podman, which provides a clearer message
docker version
docker info
Additional Info