[Kea-users] Use of include statement doesn't seem to work (INTERNAL)

Weisteen Per per.weisteen at telenor.no
Tue Mar 14 12:45:26 UTC 2023


Hi

I'm running KEA 4.0.3 on RHEL 8 and I've added 2 include statements in kea-dhcp4.conf file, one for HA config and one for subnets.
This makes it easier to maintain a shared config file for the 2 KEA servers I'm running. The only difference is in the HA config.
The subnet config file is created running a Python script using a csv file as input.  

Running kea-dhcp4 -t /etc/kea/kea-dhcp4.conf returns no errors but trying to start kea-dhcp4 fails using systemctl. 
If I actually include the two config files into one large config file then kea-dhcp4 starts with no errors.  

Is there a known bug here?

Relevant part of kea-dhcp4.conf. Having a comma after the <?include "subnets.conf"?> is necessary  because Python won't create it when using the JSON package.

        "hooks-libraries": [{
                "library": "/usr/lib64/kea/hooks/libdhcp_stat_cmds.so",
                "parameters": {}
                },
                {
                "library": "/usr/lib64/kea/hooks/libdhcp_lease_cmds.so",
                "parameters": { }
                },
                {
                "library": "/usr/lib64/kea/hooks/libdhcp_ha.so",
                "parameters": {
                <?include "ha-def.conf"?>
                }
        }],

        "subnet4":
        <?include "subnets.conf"?>
        ,


ha-def.conf :

#! .json
"high-availability": [{
        "this-server-name": "cctv-dhcp01",
        "mode": "hot-standby",
        "heartbeat-delay": 10000,
        "max-response-delay": 60000,
        "max-ack-delay": 5000,
        "max-unacked-clients": 5,
        "sync-timeout": 90000,
        "multi-threading": {
                "enable-multi-threading": true,
                "http-dedicated-listener": true,
                "http-listener-threads": 4,
                "http-client-threads": 4
        },
        "peers": [{
                "name": "cctv-dhcp01",
                "url": "http://10.123.97.212:8001/",
                "role": "primary",
                "auto-failover": true
        },{
                "name": "cctv-dhcp02",
                "url": "http://10.123.105.228:8001/",
                "role": "standby",
                "auto-failover": true
        }]
}]

subnet.conf :

[
  {
    "subnet": "10.40.131.128/26",
    "pools": [
      {
        "pool": "10.40.131.150 - 10.40.131.190"
      }
    ],
    "reservations": [],
    "option-data": [
      {
        "name": "routers",
        "data": "10.40.131.129"
      }
    ]
  },
  {
    "subnet": "10.40.131.192/26",
    "pools": [
      {
        "pool": "10.40.131.220 - 10.40.131.254"
      }
    ],
    "reservations": [],
    "option-data": [
      {
        "name": "routers",
        "data": "10.40.131.193"
      }
    ]
  }
]


./PerW


Sensitivity: Internal


More information about the Kea-users mailing list