Discussion:
[chrony-users] Asking chronyd not to combine time from multiple sources
Chris Perl
2017-09-21 11:54:02 UTC
Permalink
I would like a way to be able to ask chronyd not to combine time from
multiple sources, but instead to just trim the local clock from the
selected system peer.

I believe the ways you could do that today are:

1. Only have 1 server defined in chrony.conf
2. Use the `trust' and `prefer' directives on just one server in chrony.conf

Unfortunately, I don't think I can get what I want using those while also
having the reliability I'm looking for. The issues I'm running into with
the current set of keywords stems from my exact setup, so let me explain
that it a bit more detail.

I have client systems talking to two local chronyd servers. These are
going to be high quality sources of time, as they are backed by GPS
receivers (or other high quality time sources) and are located very close
to the clients.

However, I would like a way to detect if either of them goes crazy, so I'd
like to add in some additional chronyd servers that are close, but farther
away than the local servers, and as such are subject to more uncertainty
due to network delay.

What I had intended to do, was to mark the two local servers with `trust'
and `prefer', which would cause the other servers to basically just
participate in deciding if either of the trust sources was crazy (I think).

But, if both of the local servers are selectable, I wind up with time being
combined, which I would like to be able to control (for the purposes of
reporting traceability back to UTC).

What I want to do is to implement a `exclusive' or a `nocombine' server
directive (like `noselect', `trust', `prefer', etc) that would allow you to
control this.

The idea with `exclusive' being that if the selected system peer is marked
exclusive, then all other sources that would have been combined in
SRC_SelectSource are discarded and not combined (perhaps marked
SRC_EXCLUSIVE_EXCLUDED or something like that).

The idea with `nocombine' being that if a set of servers that are
selectable, but not the system peer are marked `nocombine', they will be
discarded and no combined (perhaps marked SRC_NOCOMBINE or something like
that).

Either one would work for my use case.

Are there other directives that I'm missing that could help me achieve what
I'm shooting for?

If not, would you be open to patches implementing either `exclusive' or
`nocombine'. I think it would be a relatively easy change.
Bill Unruh
2017-09-21 12:35:04 UTC
Permalink
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
I would like a way to be able to ask chronyd not to combine time from multiple sources, but instead to just trim the local clock
from the selected system peer.
1. Only have 1 server defined in chrony.conf
2. Use the `trust' and `prefer' directives on just one server in chrony.conf
Unfortunately, I don't think I can get what I want using those while also having the reliability I'm looking for.  The issues
I'm running into with the current set of keywords stems from my exact setup, so let me explain that it a bit more detail.
I have client systems talking to two local chronyd servers.  These are going to be high quality sources of time, as they are
backed by GPS receivers (or other high quality time sources) and are located very close to the clients.
However, I would like a way to detect if either of them goes crazy, so I'd like to add in some additional chronyd servers that
are close, but farther away than the local servers, and as such are subject to more uncertainty due to network delay.
That is why any ntp manual recommends that you use at least 3 servers, so that
the system can tell when one of them has gone crazy. With just two it is
impossible.
But that third one could be lower quality one. If the two good ones are in
agreement, the third one will more or less be ignored. If one ofthe "good"
ones goes crazy and becomes much worse than the third one, then chroy will use
the good one and the third one.
What I had intended to do, was to mark the two local servers with `trust' and `prefer', which would cause the other servers to
basically just participate in deciding if either of the trust sources was crazy (I think).
No need. chrony will find that they deliver better time (less fluctuation) and
use them to discipline the local clock.
But, if both of the local servers are selectable, I wind up with time being combined, which I would like to be able to control
(for the purposes of reporting traceability back to UTC).
???
What I want to do is to implement a `exclusive' or a `nocombine' server directive (like `noselect', `trust', `prefer', etc) that
would allow you to control this.
The idea with `exclusive' being that if the selected system peer is marked exclusive, then all other sources that would have
been combined in SRC_SelectSource are discarded and not combined (perhaps marked SRC_EXCLUSIVE_EXCLUDED or something like that).
The idea with `nocombine' being that if a set of servers that are selectable, but not the system peer are marked `nocombine',
they will be discarded and no combined (perhaps marked SRC_NOCOMBINE or something like that).
Either one would work for my use case.
Are there other directives that I'm missing that could help me achieve what I'm shooting for?
If not, would you be open to patches implementing either `exclusive' or `nocombine'.  I think it would be a relatively easy
change.
Not at all clear what you are asking for.
Holger Hoffstätte
2017-09-21 12:42:28 UTC
Permalink
Post by Chris Perl
I would like a way to be able to ask chronyd not to combine time from
multiple sources, but instead to just trim the local clock from the
selected system peer.
Are you looking for the "combinelimit <n>" directive?
If I understand you correctly, "combinelimit 0" does exactly what you are
asking for and works fine here.

cheers,
Holger
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Chris Perl
2017-09-21 12:50:31 UTC
Permalink
On Thu, Sep 21, 2017 at 8:42 AM, Holger Hoffstätte
Post by Holger Hoffstätte
Are you looking for the "combinelimit <n>" directive?
If I understand you correctly, "combinelimit 0" does exactly what you are
asking for and works fine here.
Ah, very possibly! I will play with that and see if it does what I want.

I didn't see it as I was just looking in SRC_SelectSource and figured
by the time combine_sources was called it was too late to do any more
filtering.

Thanks!
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Miroslav Lichvar
2017-09-21 12:47:56 UTC
Permalink
Post by Chris Perl
I would like a way to be able to ask chronyd not to combine time from
multiple sources, but instead to just trim the local clock from the
selected system peer.
1. Only have 1 server defined in chrony.conf
2. Use the `trust' and `prefer' directives on just one server in chrony.conf
There is also the combinelimit directive. If you set the limit to 0,
I think it should do exactly what you are asking.
--
Miroslav Lichvar
--
To unsubscribe email chrony-users-***@chrony.tuxfamily.org
with "unsubscribe" in the subject.
For help email chrony-users-***@chrony.tuxfamily.org
with "help" in the subject.
Trouble? Email ***@chrony.tuxfamily.org.
Loading...