Bug 1398027

Summary: NTP fails to start on boot after service is enabled
Product: [Fedora] Fedora Reporter: Scott Baker <scott>
Component: ntpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: johannbg, jsynacek, lnykryn, mlichvar, msekleta, muadda, scott, ssahani, s, systemd-maint, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-30 08:33:32 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:

Description Scott Baker 2016-11-23 22:25:03 UTC
Description of problem: NTP fails to start on boot

Steps to Reproduce:
1) Install base Fedora 25 x86_64 Server
2) Leave "Software Selection" on "Fedora Server Edition"
3) All install options default
4) Once VM is built and booted
5) dnf -y install ntp
6) systemctl enable ntpd
7) reboot
8) Notice that ntpd does *not* start on boot

Actual results:
[root@localhost ~]# systemctl status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

Expected results:
NTP loads on boot

Additional info:
I can start NTP manually just fine, it just won't start on boot. "systemctl start ntpd" will start it manually everytime. Nothing is shown in journalctl, /var/log/messages, or dmesg. NTP silently fails to start.

Comment 1 Jan Synacek 2016-11-24 09:26:52 UTC
If nothing shows anywhere and stuff doesn't work, that usually suggests that there was a selinux denial. Have you tried setting selinux to permissive?

Comment 2 Scott Baker 2016-11-29 21:17:52 UTC
I did some more testing and was able to determine that the problem is *not* selinux related. It looks like the "server" config installs chronyd, which conflicts with NTPd. After I did "systemctl disable chronyd" NTPd starts properly on boot.

There should probably be some sort of conflicts section added to NTPd so it disables chronyd when it's installed.

Comment 3 Miroslav Lichvar 2016-11-30 08:33:32 UTC
The chronyd unit file has "Conflicts=ntpd.service", so they can't be started both at the same time. If you need to start ntpd, you need to either remove the chrony package, or at least disable the chronyd service. This is documented in the sysadmin guide:

https://docs.fedoraproject.org/en-US/Fedora/24/html/System_Administrators_Guide/s1-Disabling_chrony.html

Note that while chronyd doesn't operate as an NTP server by default, adding a single "allow" line to chrony.conf will make it so.