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

2020-06-29 Thread Miroslav Lichvar
On Fri, Jun 26, 2020 at 12:43:08AM -0400, Robert Fairley wrote: > There could still be ways to proceed without doing this, but I'm not > sure of a natural way of grouping the directives into files, without > assuming which ones are likely to be overridden by a distribution > and preserving

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

2020-06-25 Thread Robert Fairley
On Mon, Jun 22, 2020 at 11:19 AM Miroslav Lichvar wrote: > > On Thu, Jun 18, 2020 at 11:21:29AM -0400, Robert Fairley wrote: > > On Thu, Jun 18, 2020 at 6:31 AM Miroslav Lichvar > > wrote: > > > > > > I think it could be a fragment now, and probably everything else > > > except the default

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

2020-06-22 Thread Miroslav Lichvar
On Thu, Jun 18, 2020 at 11:21:29AM -0400, Robert Fairley wrote: > On Thu, Jun 18, 2020 at 6:31 AM Miroslav Lichvar wrote: > > > > I think it could be a fragment now, and probably everything else > > except the default servers. I'll see if I can add an example of > > a fragmented configuration,

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

2020-06-18 Thread Robert Fairley
On Thu, Jun 18, 2020 at 6:31 AM Miroslav Lichvar wrote: > > I think it could be a fragment now, and probably everything else > except the default servers. I'll see if I can add an example of > a fragmented configuration, which downstreams could use. > That'd help a lot! Would then rebase

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

2020-06-18 Thread Miroslav Lichvar
On Thu, Jun 18, 2020 at 04:01:27AM -0400, Robert Fairley wrote: > For now I've left https://src.fedoraproject.org/rpms/chrony/pull-request/3 > with a fragment for `sourcedirs`, as the PR is pending the `sourcedirs` > being packaged. In the meantime I can take a look to see what changes > are

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

2020-06-18 Thread Robert Fairley
On Wed, Jun 10, 2020 at 2:59 AM Miroslav Lichvar wrote: > > On Tue, Jun 09, 2020 at 02:09:54PM -0400, Robert Fairley wrote: > > 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

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

2020-06-10 Thread Miroslav Lichvar
On Tue, Jun 09, 2020 at 02:09:54PM -0400, Robert Fairley wrote: > 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

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

2020-06-09 Thread Robert Fairley
On Mon, Jun 8, 2020 at 10:54 AM Miroslav Lichvar wrote: > Would it make sense to add a suffix to the non-DHCP dispatcher script > (e.g .online -> 20-chrony-online) to avoid confusion with the two > scripts? Done - I gave it `onoffline` as a suffix, just to help suggest it applies for offline

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

2020-06-09 Thread Robert Fairley
On Tue, Jun 9, 2020 at 5:54 AM Miroslav Lichvar 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

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

2020-06-09 Thread Miroslav Lichvar
On Fri, Jun 05, 2020 at 06:23:21PM -0400, Robert Fairley wrote: > Attached an interdiff of the overall changes from last comments. > > I have also updated https://src.fedoraproject.org/rpms/chrony/pull-request/3 > with the downstream patch that would be applied downstream to work with >

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

2020-06-08 Thread Miroslav Lichvar
On Fri, Jun 05, 2020 at 06:23:21PM -0400, Robert Fairley wrote: > On Thu, May 28, 2020 at 5:44 AM Miroslav Lichvar wrote: > > I suspect this breaks the networkd-dispatcher support. IIRC there are no > > arguments passed to the script. > > I see - I should have looked into what'd happen if less

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

2020-06-05 Thread Robert Fairley
On Thu, May 28, 2020 at 5:44 AM Miroslav Lichvar wrote: > > From 9cf2514489352140f70d650cfc6f41f4e4f6a983 Mon Sep 17 00:00:00 2001 > > From: Robert Fairley > > Date: Sat, 23 May 2020 02:10:38 -0400 > > Subject: [PATCH 1/2] examples: upstream chrony.helper script > > This patch looks good to me,

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

2020-05-28 Thread Miroslav Lichvar
On Tue, May 26, 2020 at 03:26:21PM -0400, Robert Fairley wrote: > Thank you for the feedback and suggestions on the approach, makes sense > to keep the files as general examples without the distribution-specific > handling. I have updated the patch to include chrony.helper.in, following > these

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

2020-05-26 Thread Robert Fairley
On Mon, May 25, 2020 at 7:27 AM Miroslav Lichvar wrote: > I'd rather avoid having any distribution-specific code in the > examples. If there was a downstream change in one of the directories > for instance, we would need to support different versions of the > distribution. > > If you would like

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

2020-05-25 Thread Miroslav Lichvar
On Thu, May 21, 2020 at 01:48:31PM -0400, Robert Fairley wrote: > Would it be reasonable to check `os-release`, and source /etc/sysconfig > if `ID`/`ID_LIKE` has `fedora` or `rhel`? Directories set by > $chrony_conf, $chrony_service, and $helper_dir could be set in an > environment file maintained

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

2020-05-21 Thread Robert Fairley
On Thu, May 21, 2020 at 10:39 AM Miroslav Lichvar wrote: > > With this change the example NM dispatcher script would depend on the > chrony-helper script, which is not included in the upstream > repository. The patch should be downstream, or the helper script needs > to be modified to work on all

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

2020-05-21 Thread Miroslav Lichvar
On Thu, May 21, 2020 at 09:56:30AM -0400, Robert Fairley wrote: > Following discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1800901, > this patch carries over NTP config for DHCP client backends in > NetworkManagerother than dhclient. I have tested this with a Fedora > machine using the