Bug 988563 - Regression: CPUShares= directive not recognized
Regression: CPUShares= directive not recognized
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
All Linux
unspecified Severity high
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-25 16:32 EDT by David Strauss
Modified: 2013-12-22 23:21 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-22 23:21:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Strauss 2013-07-25 16:32:17 EDT
In a service, the CPUShares= directive should control the corresponding cgroups attribute, as documented in the systemd.exec manpage. Instead, it fails to recognize the directive and does nothing.

It's easy to reproduce: just add CPUShares=1000 to a service (in the [Service] section), tail the journal, systemctl daemon-reload, and restart the service. It should complain.
Comment 1 David Strauss 2013-07-25 16:35:36 EDT
I noted that it's a regression because the directive certainly used to work when we added to our Chef recipes, and there's not reason it should have stopped working.
Comment 2 Lennart Poettering 2013-07-25 21:09:44 EDT
Which version of systemd? This really should just work.
Comment 3 David Strauss 2013-07-25 23:01:08 EDT
Hmm, not seeing this on my desktop if I install nginx and then just add CPUShares, but I do see it on our servers.

Here's the log entry, which we get for all units like this:

Jul 23 22:43:50 endpointd64dcb37 systemd[1]: [/etc/systemd/system/php_fpm_site_exp_mon.service:27] Unknown or unsupported cgroup attribute CPUShares, ignoring: 250

Here's the full unit file:

[straussd@endpointd64dcb37 ~]$ sudo cat /etc/systemd/system/php_fpm_site_exp_mon.service
# Dropped off by Chef

Description=PHP-FPM server for binding cem

ExecStart=/opt/php-5.3/php-fpm --fpm-config=/opt/site_experience_monitor/php-fpm.conf --php-ini=/opt/site_experience_monitor/php53.ini
ExecReload=/bin/kill -USR2 $MAINPID

# Filesystem restrictions
# There are read-dependencies on /usr, /bin, /dev, /lib, /lib64, /proc, /srv, /dev, /proc
# There are read/write dependencies on /tmp /srv
# We'd like to remove dependencies and lock-down /dev /proc /tmp /srv
# /etc is used for /etc/php.d
ReadWriteDirectories=/opt/site_experience_monitor/run /opt/site_experience_monitor/logs /opt/site_experience_monitor/files /tmp
ReadOnlyDirectories=/opt/site_experience_monitor/code /usr /bin /dev /lib /lib64 /proc /dev /etc
# This last one didn't want to work so we're skipping it for now
#InaccessibleDirectories=/boot /home /media /mnt /opt /root /run /sbin /selinux /sys /var /etc/pantheon

# Basic Cgroups Config
# Per: http://0pointer.de/public/systemd-man/systemd.exec.html


And here's the version of systemd we're running on that box:

[straussd@endpointd64dcb37 ~]$ yum info systemd
sensu                                                                                                                                                                     20/20
Installed Packages
Name        : systemd
Arch        : x86_64
Version     : 204
Release     : 9.fc19
Size        : 10 M
Repo        : installed
From repo   : updates-testing
Comment 4 David Strauss 2013-07-25 23:03:22 EDT
Not sure why it says "updates-testing". It's the current stable repo release: https://admin.fedoraproject.org/updates/FEDORA-2013-11662/systemd-204-9.fc19
Comment 5 John Horne 2013-08-29 12:13:18 EDT
I came across the same error message when running BOINC:

  Aug 29 16:49:30 jhorne systemd[1]: [/usr/lib/systemd/system/boinc-
  client.service:8] Unknown or unsupported cgroup attribute CPUShares, ignoring: 2

However, I also came across this:


which seems to indicate that it has been fixed upstream. If this was a regression then there is no indication of why/how it happened.

systemd RPM is currently systemd-204-9.fc19.x86_64
Comment 6 David Strauss 2013-09-30 16:19:27 EDT
Yes, that commit almost certainly fixes it. That ought to be backported to F18+.
Comment 7 Zbigniew Jędrzejewski-Szmek 2013-10-21 17:31:08 EDT
One of the previous updates for F19 had this patch. Reassigning to F18.
Comment 8 Fedora End Of Life 2013-12-21 10:39:40 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 9 Zbigniew Jędrzejewski-Szmek 2013-12-22 23:21:51 EST
This was fixed by last (or maybe previous) update.

Note You need to log in before you can comment on or make changes to this bug.