Bug 1302305

Summary: systemctl is not updating cgroup resource in /sys/fs/cgroup/ value after set property to -1
Product: Red Hat Enterprise Linux 7 Reporter: Mohit Agrawal <moagrawa>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: fsumsal, jrybar, lnykryn, moagrawa, pmali, ssahani, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-219-50.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 11:16:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1203710, 1298243, 1313485, 1420851, 1466365    

Description Mohit Agrawal 2016-01-27 12:48:55 UTC
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:

Comment 4 Lukáš Nykrýn 2016-07-28 12:18:56 UTC
We were not able to fix it in 7.3 timeframe, let's postpone it to 7.4.

Comment 10 Lukáš Nykrýn 2017-11-23 12:07:17 UTC
fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/146 -> post

Comment 12 Lukáš Nykrýn 2017-12-04 13:00:12 UTC
fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/177 -> post

Comment 17 errata-xmlrpc 2018-04-10 11:16:36 UTC
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