<div dir="ltr"><div class="gmail_default" style="font-size:small">I am running Kea on RockyLinux8 and RHEL8.  For those systems I usually run "service kea-dhcp4 reload" and "service kea-dhcp6 reload" anytime I update the .json configuration files.  And as far as I can tell, when I do that there are no DHCP replies from the server for 10-20 seconds.  Or at least nothing is logged during that time.  I have not looked at that very closely as reloading the Kea service is not very common for us now that it is all up and running.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Dan</div><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 18, 2022 at 2:24 AM Veronique Lefebure <<a href="mailto:Veronique.Lefebure@cern.ch">Veronique.Lefebure@cern.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-8967846920327517071">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Many thanks for these interesting hints!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
A last question then: how do you notify KEA processes (kea-dhcp4, kea-dhcp6) in case you modify any of you json files ? with a "reload" command ?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Thanks,
<div>Veronique</div>
</div>
<div id="m_-8967846920327517071appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-8967846920327517071divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Dan Oachs <<a href="mailto:doachs@gac.edu" target="_blank">doachs@gac.edu</a>><br>
<b>Sent:</b> Thursday, November 17, 2022 8:36 PM<br>
<b>To:</b> Veronique Lefebure <<a href="mailto:Veronique.Lefebure@cern.ch" target="_blank">Veronique.Lefebure@cern.ch</a>><br>
<b>Cc:</b> <a href="mailto:kea-users@lists.isc.org" target="_blank">kea-users@lists.isc.org</a> <<a href="mailto:kea-users@lists.isc.org" target="_blank">kea-users@lists.isc.org</a>><br>
<b>Subject:</b> Re: [Kea-users] How to best update the KEA configuration on a HA hot-standby KEA setup</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div style="font-size:small">The great thing about Kea is that it is very flexible and you can make it work in a wide variety of ways and find the setup that works best for your situation.</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">In our case we have a hybrid setup.  The kea-dhcp4.conf file has all the global settings, and we define the hosts-database for storing host reservations.  We also break out all the subnet config into a separate
 subnets.json file and have the main file include that.</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">We update the database directly from our own registration system, which is not recommended, but works fo us.  We chose not to pay for the host commands hook library that is required to use the api example
 you mentioned. <br>
</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">I am pretty sure that you can do almost everything in the database that you can do in the config file, but are only using the database to store the host information.  I do see tables in the database that
 start with dhcp4_client_class which would lead me to believe that you can do what you want with the database configuration.</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">--Dan</div>
<div style="font-size:small"><br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Thu, Nov 17, 2022 at 9:48 AM Veronique Lefebure <<a href="mailto:Veronique.Lefebure@cern.ch" target="_blank">Veronique.Lefebure@cern.ch</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Thanks Dan!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">So you have a hybrid configuration ?</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">What do you mean by "main configuration" ? <span style="margin:0px">Topology (shared-networks and subnets) in json file and host-reservations in a database ?</span></div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">Do you update the database using "reservation-add"  (<a href="https://kea.readthedocs.io/en/latest/api.html?highlight=host%20reservation#reservation-add" title="https://kea.readthedocs.io/en/latest/api.html?highlight=host%20reservation#reservation-add" style="margin:0px" target="_blank">https://kea.readthedocs.io/en/latest/api.html?highlight=host%20reservation#reservation-add</a> )
 ?</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)"><br>
</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">We have client classes with a test expression that depends on the mac addresses of the clients.</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">Can these classes be stored in the database as well ?</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)"><br>
</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">Thanks,<br>
<span style="margin:0px">Veronique</span></div>
<br>
</div>
<div id="m_-8967846920327517071x_m_-4452976748141530048signature_bookmark"></div>
<div id="m_-8967846920327517071x_m_-4452976748141530048appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-8967846920327517071x_m_-4452976748141530048divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Dan Oachs <<a href="mailto:doachs@gac.edu" target="_blank">doachs@gac.edu</a>><br>
<b>Sent:</b> Thursday, November 17, 2022 4:20 PM<br>
<b>To:</b> Veronique Lefebure <<a href="mailto:Veronique.Lefebure@cern.ch" target="_blank">Veronique.Lefebure@cern.ch</a>><br>
<b>Cc:</b> <a href="mailto:kea-users@lists.isc.org" target="_blank">kea-users@lists.isc.org</a> <<a href="mailto:kea-users@lists.isc.org" target="_blank">kea-users@lists.isc.org</a>><br>
<b>Subject:</b> Re: [Kea-users] How to best update the KEA configuration on a HA hot-standby KEA setup</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div style="font-size:small">We also have all the main configuration in plain json files.  Like you, we require hosts on some of our networks to be registered.  Our registration system stores the MAC addresses in the Kea database.  For the past year or so,
 this has worked really well for us.</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">I would highly suggest looking into storing the MAC addresses in a database so you don't need to reload kea for every change.  You don't need to use the database for anything else if you don't want to.   This can also be done without
 any of the extra hook libraries that cost money.<br>
</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">--Dan</div>
<div style="font-size:small"><br>
</div>
<div dir="ltr">
<div style="font-size:small"><br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Thu, Nov 17, 2022 at 2:19 AM Veronique Lefebure <<a href="mailto:Veronique.Lefebure@cern.ch" target="_blank">Veronique.Lefebure@cern.ch</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
We don't use any database for storing the KEA configuration: we use plain json configuration files<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
We need to update the configuration very regularly because we allow only known clients (pre-registered mac addresses), hence the list of host-reservations is quite volatile.</div>
<div id="m_-8967846920327517071x_m_-4452976748141530048x_m_2048582629240158331signature_bookmark"></div>
<div id="m_-8967846920327517071x_m_-4452976748141530048x_m_2048582629240158331appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Véronique</div>
<hr style="display:inline-block;width:98%">
<div id="m_-8967846920327517071x_m_-4452976748141530048x_m_2048582629240158331divRplyFwdMsg" dir="ltr">
<font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Dan Oachs <<a href="mailto:doachs@gac.edu" target="_blank">doachs@gac.edu</a>><br>
<b>Sent:</b> Wednesday, November 16, 2022 6:31 PM<br>
<b>To:</b> Veronique Lefebure <<a href="mailto:Veronique.Lefebure@cern.ch" target="_blank">Veronique.Lefebure@cern.ch</a>><br>
<b>Cc:</b> <a href="mailto:kea-users@lists.isc.org" target="_blank">kea-users@lists.isc.org</a> <<a href="mailto:kea-users@lists.isc.org" target="_blank">kea-users@lists.isc.org</a>><br>
<b>Subject:</b> Re: [Kea-users] How to best update the KEA configuration on a HA hot-standby KEA setup</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div style="font-size:small">I am curious why you are updating the config every 5 minutes.   We used to do that with our old DHCP server, but with Kea we moved to storing reservations in a database.  That way we rarely need to make changes to the actual Kea
 configuration that would necessitate a reload of the config.</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">--Dan</div>
<div style="font-size:small"><br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Wed, Nov 16, 2022 at 10:27 AM Veronique Lefebure <<a href="mailto:Veronique.Lefebure@cern.ch" target="_blank">Veronique.Lefebure@cern.ch</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Hi,</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
When running KEA on one single server, (no HA), and updating the KEA dhcp configuration file every 5 minute, using "config-set" </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<a href="https://kea.readthedocs.io/en/latest/arm/ctrl-channel.html?highlight=config-set#the-config-set-command" title="https://kea.readthedocs.io/en/latest/arm/ctrl-channel.html?highlight=config-set#the-config-set-command" target="_blank">https://kea.readthedocs.io/en/latest/arm/ctrl-channel.html?highlight=config-set#the-config-set-command</a> ,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
we can see that KEA does not reply to the DHCP requests during 30-35 seconds while "config-set" is running.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Is it expected ?</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
If yes, if we add a second server in a HA hot-standby mode, can we expect it to answer to the DHCP requests while the first server is busy with config-set ?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
If yes, we need to update the second server asynchronously with respect to the first one, else they would both be busy with "config-set" at the same time.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I would be interested to know how people are updating the KEA DHCP configuration in a HA hot-standby setup.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Thanks,
<div>Veronique</div>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
</div>
-- <br>
ISC funds the development of this software with paid support subscriptions. Contact us at
<a href="https://www.isc.org/contact/" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" target="_blank">
https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
<br>
Kea-users mailing list<br>
<a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>

</div></blockquote></div>