Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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:
Embargoed:
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