Re: [chrony-users] Does chrony support the DHCP option ntp-servers?

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


Miroslav,
You are correct, this is about the client-side; I've already got my DHCP server configured.  

After reading your and Holger's comments, I did realize I was going somewhat in the wrong direction, though.  As I now understand it, the configuration is (at least mostly) with the DHCP client.  I am working on this on CentOS 8, and am using Network Manager.  I see that NM has a chrony script (/etc/NetworkManager/dispatcher.d/20-chrony) which, when the network goes up or down, toggles the on/offline status of chrony.  I also see that it has a script (11-dhclient) looks to see if there are scripts in /etc/dhclient.d, and runs them.  One of the scripts it looks for is one for chrony.  Unfortunately, that directory doesn't exist, much less the script itself.

To further potentially complicate things, These systems are PXE booting, so they're getting their info from a DHCP server before the kernel and the OS load.

So, my questions for this group at this point are:

1.)  Is there something about toggling chrony's state that would cause it to receive an NTP server name/address from DHCP?  (That seems unlikely.)
2.) Since this is a PXE client, is there even a way to get DHCP options to the OS DHCP client, and to chrony from there?
3.) If it is possible, does anyone here know how to configure CentOS/RHEL 8 to use the DCHP ntp-servers option?  I recognize that is the list for chrony itself, and that no one here actually works for or otherwise supports RHEL, but if someone does know how to do this, I'd appreciate the knowledge transfer.

In any case, I will be asking similar questions in CentOS forums to see what help I can get there too.  I would still, of course, like to see what I can find out here.

Thank you all,

-- 
Jason Lewis
Senior Systems Engineer
 

On 3/31/20, 03:31, "Miroslav Lichvar" <mlichvar@xxxxxxxxxx> wrote:

    External email – Please make sure you trust the source before clicking links or opening attachments.
    
    On Tue, Mar 31, 2020 at 02:09:13AM +0200, Holger Hoffstätte wrote:
    > On 3/31/20 1:18 AM, Jason W. Lewis wrote:
    > > I’m looking at using chrony on our network for the first time, and
    > > want it to accept the ntp-servers DHCP option.  Does it?  And if so,
    > > how?  I haven’t seen any documentation showing how to do this, so I
    > > suspect it’s not supported, but at the same time, nothing says it
    > > doesn’t either,  so I wanted to be sure.
    > That's something you would configure in your DHCP server, not chrony.
    > chrony just hands out the time; the DHCP server is the one pointing clients
    > at your chrony server(s).
    
    I think the question was about the client side of DHCP.
    
    chronyd doesn't know anything about DHCP, but it can be configured at
    run time with NTP servers provided by DHCP using chronyc. In some
    distributions (e.g. Fedora, Debian/Ubuntu, OpenSUSE) there is a
    chrony-helper script and a NetworkManager or dhclient dispatcher
    script, which runs the helper script when DHCP provided the client
    with some NTP servers.
    
    --
    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+ http://listengine.tuxfamily.org/