Re: [chrony-users] Pool vs. server without config parsing |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
On Mon, Jun 24, 2024 at 11:54:47 +0200, Miroslav Lichvar wrote:
> On Fri, Jun 21, 2024 at 10:05:27AM -0400, Josef 'Jeff' Sipek wrote:
> > That is, when we see 3 sources in `chronyc sources` we can't find a way to
> > tell if we are looking at 3 servers or a pool of 3. The closest thing we
> > came up with is to use `chronyc sourcename` for each source, and try to
> > collate the results, but this seems hacky/fragile.
> >
> > Is there a way to distinguish the two scenarios?
>
> No, that information is not exposed. When a pool reaches the
> maxsources number of servers, it behaves same as if a server
> was repeated maxsources times in the config.
Good to know that we're not missing anything - thanks!
> It's not very clear to me how would that help you. There could be an
> unexpected script adding or removing sources with the chronyc
> add/delete command, or the reload sources command (e.g. DHCP hook).
We're migrating our software stack from a bit of a wild west - where various
components tweak settings as needed - to a custom API-driven management
daemon that handles lots of different things (IOW, not just chrony).
So, we're starting with an "unknown" config for chrony (it could have a
variety of tweaks, but 99.99999% chance it is just server/pool lines) and
the new API way needs to behave properly when updating the bespoke config.
Since the daemon doesn't expose any pool vs. server info, I think the sanest
way to do this is to parse `chronyd -p` to figure out what servers/pools are
configured.
We'll have to experiment.
Thanks,
Jeff.
--
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.