Force immediate verification of NTP server status

Thangalin <[email protected]>
Newsgroups gmane.comp.time.chrony.user
Message-ID <CAANrE7qNtKDWauEp6pKSGGBfL=3NtwjhwjdMm3Jd+rdiKQ0ppg@mail.gmail.com>
Hi,

We'd like to force chronyd to verify that all NTP servers are currently
available in a deterministic fashion. Presently, we have a computer
physically connected via Ethernet to a local NTP server.

The /etc/chrony/chrony.conf contains:

  server 10.10.10.10 minpoll 0 maxpoll 0 ... etc.
  makestep 1 3

Chrony queries the server at a regular 1-second interval, as expected. When
running libchrony's examples-report, we see:

  State: Selectable
  Mode: Client

This is expected. For test purposes, we want to drop the server connection
and verify the result. For example:

  iptables -A OUTPUT -dport 123 -d 10.10.10.10 -j DROP

It seems chrony takes non-deterministic time of approximately 1 second to
determine that the NTP server is offline.

Can we force chronyd to refresh its state immediately, such that upon
returning from the request (or command) the State is guaranteed Selectable
for a valid connection and Nonselectable when severed?

At present, we need to introduce a 1.1-second delay in our tests to give
chronyd time to detect the NTP server disconnection. While this works, it
slows down the unit tests and introduces knock-on issues.

Do we need to call something similar to the following:

chronyc -m 'burst 3/3' 'makestep 0.1 3'

Thank you!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.