Bug 1398027 - NTP fails to start on boot after service is enabled
Summary: NTP fails to start on boot after service is enabled
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ntp
Version: 25
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-23 22:25 UTC by Scott Baker
Modified: 2016-11-30 08:33 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-30 08:33:32 UTC
Type: Bug


Attachments (Terms of Use)

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.


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