IP allocation fails for reserved client with assingned class
Hello,
using KEA 2.4.1 and experiencing issue with assigning addresses to PXE clients with configured class for assigning different boot image depending on option 60.
I have anonymized MAC to aa:bb:cc:dd:ee:ff from real one and also anonymized IPs.
Same behavior for multiple hosts in multiple subnets, following one host for example. No issue on segments using reservations and not using client-class.
3 messages are logged for each DISCOVERY.
Feb 21 15:23:57 dhcp-srv1 kea-dhcp4: WARN [kea-dhcp4.alloc-engine.139809839666944] ALLOC_ENGINE_V4_ALLOC_FAIL_SUBNET [hwtype=1 aa:bb:cc:dd:ee:ff], cid=[no info], tid=0x3969612c: failed to allocate an IPv4 lease in the subnet 10.10.10.0/24, subnet-id 1251066000, shared network (none)
Feb 21 15:23:57 dhcp-srv1 kea-dhcp4: WARN [kea-dhcp4.alloc-engine.139809839666944] ALLOC_ENGINE_V4_ALLOC_FAIL_NO_POOLS [hwtype=1 aa:bb:cc:dd:ee:ff], cid=[no info], tid=0x3969612c: no pools were available for the address allocation
Feb 21 15:23:57 dhcp-srv1 kea-dhcp4: WARN [kea-dhcp4.alloc-engine.139809839666944] ALLOC_ENGINE_V4_ALLOC_FAIL_CLASSES [hwtype=1 aa:bb:cc:dd:ee:ff], cid=[no info], tid=0x3969612c: Failed to allocate an IPv4 address for client with classes: ALL, HA_dhcp-srv1.company.cz, archi00, UNKNOWN
As seen from log, subnet is correctly recognized and it doesn't have any pool. Checked that configuration file with segment definition is included.
Subnet definition, only reservations (shortened to one host, all reservations defined in same format, no typo on MAC, checked):
{
"subnet": "10.10.10.0/24",
"id": 1251066000,
"option-data": [
{
"name": "routers",
"data": "10.10.10.1"
},
{
"name": "domain-name",
"data": "company.cz"
}
],
"next-server": "10.30.30.30",
"reservations": [
.......
{
#"hostname": "server.company.cz",
"hw-address": "aa:bb:cc:dd:ee:ff",
"ip-address": "10.10.10.57"
},
.......
]
};
Configuration of client-classes:
"client-classes": [
{
"name": "archi07",
"test": "(substring(option[60].hex,0,20) == 'PXEClient:Arch:00007') and (pkt.src == 10.10.30.1 or pkt.src == 10.10.10.1 or pkt.src == 10.10.20.1)",
"option-data": [
{
"name": "boot-file-name",
"data": "/grub/x86_64-efi/core.efi"
}
]
},
{
"name": "archi09",
"test": "(substring(option[60].hex,0,20) == 'PXEClient:Arch:00009') and (pkt.src == 10.10.30.1 or pkt.src == 10.10.10.1 or pkt.src == 10.10.20.1)",
"option-data": [
{
"name": "boot-file-name",
"data": "/grub/x86_64-efi/core.efi"
}
]
},
{
"name": "archi00",
"test": "(pkt.src == 10.10.30.1 or pkt.src == 10.10.10.1 or pkt.src == 10.10.20.1) and (not member ('archi07') or not member ('archi09'))",
"option-data": [
{
"name": "boot-file-name",
"data": "/grub/i386-pc/core.0"
}
]
}
],
We had switched back to old isc-dhcp-server for affected segments for now. There clients are assigned with address.
Do we miss something or is this a bug?
Thanks Michal