Re: [chrony-dev] [PATCH] nm-dispatcher: handle NTP servers from DHCP

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Tue, Jun 9, 2020 at 5:54 AM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
> Following up on the comments from bugzilla about reloading
> configuration.
>
> chronyd cannot easily support reloading its configuration (e.g. due to
> losing root privileges), but it could have a directive specific to NTP
> sources. The files could be reloaded on request from chronyc. It would
> basically reimplement the logic from the chrony-helper script, which
> would became redundant.
>
> A dispatcher script would just create or remove a *.sources file in a
> directory (e.g. /var/run/chrony-dhcp) specified in chrony.conf and a
> chronyc command would tell chronyd to add the new sources and/or
> remove sources that are no longer there.
>

That sounds a good idea! We only need to reload the NTP sources -
having a directive to specify where the NTP sources are managed makes
sense. Would the directive point to a file/directory/glob to load
files containing the NTP server config from?

I'd imagine if we wanted to be able to override the directive via
host configuration in /etc, a chrony.d config fragment could
contain something like (calling it `external-sources` for the
example):

```
# /usr/lib/chrony.d/10-dhcp-sources
external-sources /var/run/chrony-dhcp/*.sources
```

Which could be overridden by dropping an empty file at
`/etc/chrony.d/10-dhcp-sources`, effectively disabling NTP
sources from DHCP.


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


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/