What were you trying to do that didn't work?
Our customer has installed /etc/systemd/system/user@.service.d/delegate.conf as a drop-in with the intended purpose to override the SystemD template file namely /usr/lib/systemd/system/user@.service.
Post reboot, we can see that the Delegate= property has been modified accordingly.
However /sys/fs/cgroup/cgroup.subtree_control is not updated until a subsequent reload of the SystemD manager configuration (i.e. systemctl daemon-reload).
What is the impact of this issue to you?
Production impacting. However, the customer has a workaround by way of a custom SystemD service to enable each required cgroup controller.
Please provide the package NVR for which the bug is seen:
systemd-239-82.el8_10.5.x86_64
How reproducible is this bug?:
Always.
Steps to reproduce
Create this systemd drop-in:
❯ cat /etc/systemd/system/user@.service.d/delegate.conf
[Service]
Delegate=cpu cpuset memory pids
CPUAccounting=yes
MemoryAccounting=yes
TasksAccounting=yes
The purpose of the above is to override the SystemD template unit file /usr/lib/systemd/system/user@.service.
Reboot.
Post reboot each property is applied yet the specified cgroup controllers are not enabled until the SystemD manager configuration is reloaded. See below.
❯ systemctl show user@$(id -u).service -p Delegate -p DelegateControllers -p CPUAccounting
Delegate=yes
DelegateControllers=cpu cpuset memory pids
CPUAccounting=yes
❯ cat /sys/fs/cgroup/cgroup.subtree_control
memory pids
❯ sudo systemctl daemon-reload
❯ cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu memory pids
Expected results
❯ cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu memory pids
without running systemctl daemon-reload command.
Actual results
❯ cat /sys/fs/cgroup/cgroup.subtree_control
memory pids