FS#40319 - [ntp] PIDFile in ntpd.service causing problems
Attached to Project:
Arch Linux
Opened by Robert Mackanics (schnoopay) - Monday, 12 May 2014, 04:02 GMT
Last edited by Gaetan Bisson (vesath) - Friday, 06 June 2014, 11:38 GMT
Opened by Robert Mackanics (schnoopay) - Monday, 12 May 2014, 04:02 GMT
Last edited by Gaetan Bisson (vesath) - Friday, 06 June 2014, 11:38 GMT
|
Details
Description:
The addition of the PIDFile=/run/ntpd.pid to ntpd.service has caused ntpd to cease to be able to resolve hostnames on my system. Placing the PIDFile option after the ExecStart line seems to fix this. I'm baffled as to why this would be. Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: |
This task depends upon
We could remove it entirely but I would like to make sure that it is the culprit first.
PIDFile=/run/ntpd.pid
ExecStart=/usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid
ntpq -p reports this:
remote refid st t when poll reach delay offset jitter
==============================================================================
*debug0-f0-0-081 204.186.0.254 3 u - 64 1 9.875 -0.221 2.817
debug0.wb3.ptd. 204.186.0.254 3 u 1 64 1 14.117 -0.278 0.999
With ntpd.service like this:
ExecStart=/usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid
PIDFile=/run/ntpd.pid
ntpq -p reports this:
remote refid st t when poll reach delay offset jitter
==============================================================================
*debug0-f0-0-081 204.186.0.254 3 u 1 64 1 9.693 -0.827 1.528
debug0.wb3.ptd. 204.186.0.254 3 u - 64 1 14.176 -0.945 1.292
bindcat.fhsu.ed 132.163.4.103 2 u - 64 1 56.606 2.638 0.314
soft-sea-01.ser 216.171.120.36 2 u 1 64 1 79.618 2.932 0.533
Which is the two servers by ip, and two servers from pool.ntp.org.
ntpd started from command line also works as expected. If I change ntp.conf to list the servers by ip after the servers by name I also get the expected result.
This may very well be something funky going on with my particular machine, as I installed arch on an old box to double check this (after I made the bug report), using the identical ntp.conf, and it worked fine. Also, on my main machine, listing the servers by ip last works fine, and only using servers with dns addresses also works fine.
I'm really confused as to what is going on here. If you want to chalk this up to an oddball one off case, I'm fine with that, as I can only reproduce this on one machine.
However I'd be glad if we could really diagnose what is wrong there. But if you cannot reproduce that on another machine, I'm afraid we're going to have to call it bad karma...