Bug 986098

Summary: RFE: one-time "check server" mode
Product: [Fedora] Fedora Reporter: Matthew Miller <mattdm>
Component: chronyAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mlichvar, samuel-rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: chrony-1.30-0.1.pre1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-09 13:50:07 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:
Embargoed:

Description Matthew Miller 2013-07-19 01:05:05 UTC
Currently, Anaconda uses ntpdate to check whether a given ntpserver is available (without setting the time). 

https://fedoraproject.org/wiki/Changes/ntpdate

proposes to deprecate ntpdate. It would be nice if chrony had an equivalent command or mode, so that chrony can completely replace the ntp package (from which ntpdate is built).

Comment 1 Miroslav Lichvar 2013-07-19 07:02:48 UTC
That would be a nice feature, I'll see if we can get it included.

In the meantime you can use sntp, which is the replacement for ntpdate recommended by the NTP upstream.

Comment 2 Miroslav Lichvar 2014-04-09 15:04:06 UTC
This is now implemented in upstream git and it will be in chrony-1.30. It can be used like this:

# ./chronyd -Q "server 0.pool.ntp.org iburst"
2014-04-09T15:00:53Z chronyd version DEVELOPMENT starting
2014-04-09T15:00:53Z Initial frequency -13.273 ppm
2014-04-09T15:00:58Z System clock wrong by -0.013297 seconds (ignored)
2014-04-09T15:00:58Z chronyd exiting

A non-zero exit code indicates that no suitable servers could be reached.