[Kea-users] kea-dhcp4 -t file: check the configuration file syntax and exit but fails because of interface

Bob Harold rharolde at umich.edu
Fri Aug 27 13:44:00 UTC 2021


I have not used kea, but if it has an "include" directive similar to dhcpd,
then I would recommend using that in one of several ways:
(this is what I do at U of Michigan)

--- interface in top level, main config in separate file:
"interfaces-config": {
"interfaces": [
"xxxxx"
],
"dhcp-socket-type": "udp"
},
include "main.config"

--- main config in top file, interfaces in separate file, where the
interfaces.config file is different on the test server.
include "interface.config"
subnet ....
subnet ....

--- or include both as separate files:
include "interface.config"
include "main.config"

-- 
Bob Harold



On Fri, Aug 27, 2021 at 9:30 AM Veronique Lefebure <
veronique.lefebure at cern.ch> wrote:

> We want to be able to validate the configuration file without
> touching/accessing the production servers, for example for
> developing/testing/validating changes in the software that generates the
> configuration file.
>
> On 27/08/2021 15:12, perl-list wrote:
> > Is it not possible to, instead, check the conf file on host2 where it
> will live?
> >
> > ----- Original Message -----
> >> From: "Veronique Lefebure" <veronique.lefebure at cern.ch>
> >> To: "kea-users" <Kea-users at lists.isc.org>
> >> Sent: Friday, August 27, 2021 5:39:15 AM
> >> Subject: [Kea-users] kea-dhcp4 -t file: check the configuration file
> syntax and exit but fails because of interface
> >> Hi,
> >> Before deploying a new kea configuration file on our DHCP server, we
> >> want to validate it.
> >> The configuration file "kea-dhcp4.conf" is generated on host1 where we
> >> want to validate it by running
> >> kea-dhcp4 -t kea-dhcp4.conf
> >> And once validation has passed, we plan to deploy "kea-dhcp4.conf" ho
> >> the KEA server running on host2.
> >> The problem we have is that validation fails with the following error:
> >> Error encountered: Failed to select interface: interface 'xxxxx' doesn't
> >> exist in the system (kea-dhcp4.conf:225:9) (kea-dhcp4.conf:224:7)
> >> coming from
> >> "interfaces-config": {
> >> "interfaces": [
> >> "xxxxx"
> >> ],
> >> "dhcp-socket-type": "udp"
> >> },
> >> Interface 'xxxxx' may exist on host2 but not on host1.
> >> Is anyone encountering the same problem ?
> >> Is there a work-around ?
> >> Thanks,
> >> Veronique
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20210827/f3d602eb/attachment.htm>


More information about the Kea-users mailing list