Red Hat Bugzilla – Bug 1302305
systemctl is not updating cgroup resource in /sys/fs/cgroup/ value after set property to -1
Last modified: 2018-04-10 07:18:54 EDT
Description of problem: After update the cgroup property with systemd the value is changed in associated cgroup resource in /sys/fs/cgroup/cpu,cpuacct/system.slice/sshd.service but after set it to -1 value is not updating in cgroup structure. Version-Release number of selected component (if applicable): systemd-219-19.el7.x86_64 How reproducible: Always Steps to Reproduce: 1) Set property value to 500 for sshd.service after execute the below command systemctl set-property sshd.service CPUShares=500 2) Check the value in cgroup file system cat /sys/fs/cgroup/cpu,cpuacct/system.slice/sshd.service/cpu.shares 500 3) set the default value to -1 systemctl set-property sshd.service CPUShares=-1 4) Now check again the value in cgroup file system cat /sys/fs/cgroup/cpu,cpuacct/system.slice/sshd.service/cpu.shares 500 It is still showing old value even new value is updated in systemd internal structures systemctl show properties sshd.service -p CPUShares CPUShares=18446744073709551615 Actual results: Value is not reflecting cgroup file system. Expected results: It should reflect in cgroup file system and cgroup file structure should also removed after set it to -1. Additional info:
We were not able to fix it in 7.3 timeframe, let's postpone it to 7.4.
fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/146 -> post
fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/177 -> post
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0711