Description of problem: ntpd cann't set the realtime scheduler Version-Release number of selected component (if applicable): ntp-4.2.6p4-1.fc16.i686 systemd-37-17.fc16.i686 How reproducible: Always Steps to Reproduce: 1. add the '-N' or '-P XX' option to /etc/sysconfig/ntpd 2. systemctl restart ntpd.service Actual results: Apr 9 12:35:53 n3331 ntpd[836]: ntpd 4.2.7p264 Mon Mar 19 08:37:28 UTC 2012 (3) Apr 9 12:35:53 n3331 ntpd[836]: 9 Apr 12:35:53 ntpd[836]: ntpd 4.2.7p264 Mon Mar 19 08:37:28 UTC 2012 (3) Apr 9 12:35:54 n3331 ntpd[836]: sched_setscheduler(): Operation not permitted Apr 9 12:35:54 n3331 ntpd[836]: 9 Apr 12:35:54 ntpd[836]: sched_setscheduler(): Operation not permitted and so on... Expected results: ntpd should set the realtime scheduler
ups... sorry... another version ntpd Actual results: Apr 9 12:38:32 n3331 ntpd[1176]: ntpd 4.2.6p4 Thu Oct 6 15:37:56 UTC 2011 (1) Apr 9 12:38:32 n3331 ntpd[1176]: sched_setscheduler(): Operation not permitted Apr 9 12:38:32 n3331 ntpd[1176]: proto: precision = 0.679 usec and so on...
It seems to be blocked by systemd. Lennart, are the processes supposed to be able to change the scheduler and priority or should it be controlled only by the CPU* settings in the service file?
By default every system service gets its own cgroup in the "cpu" hierarchy, so that an apache with 100 CGI scripts doesn't get 20x more CPU than mysql with 5 processes. Unfortunately that breaks RT for system services. (This is something that should be fixed in the kernel one day) The fix is to specifically move ntpd back into the root "cpu" cgroup, with ControlGroup=cpu:/ in the [Service] section where RT is available. Hope this helps.
ntp-4.2.6p5-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/ntp-4.2.6p5-2.fc17
Package ntp-4.2.6p5-2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ntp-4.2.6p5-2.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-6798/ntp-4.2.6p5-2.fc17 then log in and leave karma (feedback).
ntp-4.2.6p5-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
whether it will be fixed in the Fedora 16?
I'm not sure this change alone is enough for an F16 update, it's just a config file modification and the real time scheduling is not that useful with kernel packet timestamps. If there are other bugs to be fixed, this will be included.