Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904264 - app-containers/docker: drop the RT_GROUP_SCHED kernel config check
Summary: app-containers/docker: drop the RT_GROUP_SCHED kernel config check
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-13 07:33 UTC by Florian Schmaus
Modified: 2023-07-20 19:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Schmaus gentoo-dev 2023-04-13 07:33:35 UTC
The app-cotnainer/docker ebuild currently has an unconditional linux-info.eclass CONFIG_CHECK for

    ~RT_GROUP_SCHED

this causes the ebuild to issue a warning if the kernel config CONFIG_RT_GROUP_SCHED is not enabled. The check is probably motivated due to the docker documentation stating that this should be enabled *for tasks that can not use the CFS scheduler* (source: https://docs.docker.com/config/containers/resource_constraints/#configure-the).

However, a general recommendation to enable CONFIG_RT_GROUP_SCHED is problematic, because it causes RT processes to stop working out of the box. For example, systemd recommends to disable CONFIG_RT_GROUP_SCHED (source: https://github.com/systemd/systemd/blob/39857544ee3794481f165e6ecc5d5a81c65f0ee9/README#L144-L150). Fedora's default configuration, which we use for sys-kernel/gentoo-kernel also has it not enabled.

Further links to discussions about CONFIG_RT_GROUP_SCHED enabled by default being problematic:

- https://github.com/home-assistant/operating-system/issues/1235
- "CONFIG_RT_GROUP_SCHED=y harmuflull for real time applications" https://forum.armbian.com/topic/16489-config_rt_group_schedy-harmuflull-for-real-time-applications/

I think the ebuild for docker should not check for CONFIG_RT_GROUP_SCHED and issue a warning it is is disabled. At least not unconditionally. But IMHO the check should simply be removed.
Comment 1 William Hubbs gentoo-dev 2023-04-13 15:24:17 UTC
I can update the error message for this check pretty easily.
I would rather do that than remove it.
Comment 2 Florian Schmaus gentoo-dev 2023-04-13 15:47:33 UTC
> I would rather do that than remove it.

May I ask why you want to keep the check for CONFIG_RT_GROUP_SCHED?

It appears to be that only *specific* docker setups need this enabled. If ran docker on all my systems without that config option enabled. Docker's documentation even states that "CPU scheduling and prioritization are advanced kernel-level features. Most users do not need to change these values from their defaults. Setting these values incorrectly can cause your host system to become unstable or unusable." [1]. Therefore unconditionally checking for it seems not called for.

Furthermore, with bug 845243 in mind we may end up with systemd's ebuild complaining if the option is enabled, while the docker ebuild will warn if it is not enabled. So if you have a pretty standard systemd & docker setup, both packages will tell you to do what the other will tell you not to do.

At least consider downgrading the check from a warning to a log message. For example "Depending on your docker setup, you may want CONFIG_RT_GROUP_SCHED enabled. See https://docs.docker.com/config/containers/resource_constraints/#configure-the-realtime-scheduler for more information".

1: https://docs.docker.com/config/containers/resource_constraints/#configure-the-realtime-scheduler
Comment 3 Larry the Git Cow gentoo-dev 2023-04-23 21:34:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38fde13b32c8ab8a523e7bda0d4bac64a97befe0

commit 38fde13b32c8ab8a523e7bda0d4bac64a97befe0
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-04-23 21:33:55 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-04-23 21:33:55 +0000

    app-containers/docker: warn and link docs for CONFIG_RT_GROUP_SCHED
    
    Bug: https://bugs.gentoo.org/904264
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 app-containers/docker/docker-23.0.3.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 4 William Hubbs gentoo-dev 2023-04-23 21:40:10 UTC
Now you will be warned about this with a link to the documentation.
This should clarify that some setups need it without making it sound
like a requirement.
Comment 5 Florian Schmaus gentoo-dev 2023-04-27 13:12:01 UTC
Upstream has removed the check for CONFIG_RT_GROUP_SCHED in check.config.sh with https://github.com/moby/moby/commit/005150ed69c540fb0b5323e0f2208608c1204536 via https://github.com/moby/moby/pull/45361.

Now the check should be removed from the ebuild as well.
Comment 6 William Hubbs gentoo-dev 2023-07-20 19:40:27 UTC
This is fixed in 24.0.4.