Re: [chrony-users] Changing hostnames for chronyc sources and sourcestats results

[ Thread Index | Date Index | More Archives ]

On Wed, Nov 13, 2019 at 07:54:32PM +0000, Kohr, Alexander wrote:
> I have run into what I consider confusing operation/a bug of chronyc for the server name results it returns.  When I run chronyc sourcestats or chronyc sources the "Name/IP address" field doesn't always list the hostname/s that are entered into my chrony.conf file.
> It seems like instead of chronyc isn't' generating it's reports using the hostnames that are entered into my chrony.conf configuration file and  instead chronyd is taking the hostnames from the chrony.conf configuration file and then resolving it to an IP address and caching that information using that IP address to make the connections to the time servers. (which makes sense when pools are used.)  However when chronyc is called with the sources or sourcestats option, instead of using the original hostname it got from the chrony.conf file, It attempts to do a reverse DNS lookup of the numerical IP address it has been using.

That's correct. chronyc doesn't currently have access to the original
names from the config file. All commands work with IP addresses. There
is the "-n" option to disable resolving to names.

The protocol will need to be extended to exchange names. That will
also be needed for the upcoming NTS support.

> Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
> ==============================================================================
>                                      27  16   47m     +0.094      0.296   -216us   333us
> time2.example.test/                      29  17   52m     -0.080      0.110    +86us   119us
> realhostname3.example.test/     24  10   43m     -0.052      0.212   +528us   166us

One thing that I don't like about this format much is that it's too
wide and it would break compatibility with existing scripts.

I think it might be better to add a new option to display the original
names (only). The user could select what should be displayed: the IP
addresses, the current names per DNS, or the original names.

There was also a suggestion on the list that sources could have a
an alias specified in the config file, which could used for monitoring
and run-time configuration. The original hostname could be the default
value. I'm not sure how to deal with pools, however.

Miroslav Lichvar

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+