Re: [chrony-dev] [PATCH] nm-dispatcher: handle NTP servers from DHCP |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] nm-dispatcher: handle NTP servers from DHCP
- From: Robert Fairley <rfairley@xxxxxxxxxx>
- Date: Tue, 9 Jun 2020 14:09:54 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591726210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=f9aYQTUYt7X8eeYrpgkn6hV3X2NstvI8M5cWguuPJWw=; b=Lj/6596rSYItq4uEe4pbRb0LiSc8qbewdYxDGegJHLcbTVTzmv4ENxIFPrZZvXBem/uv/Y 6WC6RZ3EwFWAK9QktwAfNpZ93zq13NY9zCVcWikmvX1xN+0blp35lDyutgQfoD963ORh2e nXjOBEhSZAMX8k3Ai9Ufx6rL6eiuWbc=
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.