[Kea-users] 1.6.1 HA mode, getting ALLOC_ENGINE_V4_ALLOC_FAIL
Andreas Hasenack
andreas at canonical.com
Wed Feb 12 18:31:55 UTC 2020
Got it, -d showed what was wrong. I had the wrong name for the
automatic HA_<server> class.
On Wed, Feb 12, 2020 at 3:23 PM Andreas Hasenack <andreas at canonical.com> wrote:
>
> Hi,
>
> Hopefully I just have a typo somewhere. I'm testing HA mode with
> isc-kea 1.6.1, but my client cannot get an IP. The server shows:
>
> 2020-02-12 15:09:24.496 WARN [kea-dhcp4.alloc-engine/8222]
> ALLOC_ENGINE_V4_ALLOC_FAIL [hwtype=1 00:16:3e:ce:8b:ae], cid=[no
> info], tid=0x83958925: failed to allocate an IPv4 address after 0
> attempt(s)
>
> My test setup consists of two VMs in the same network
> (192.168.99.0/24), acting as the dhcp servers, and one single lxd
> container as the client, also on the same network. This was working
> before I brought HA into the picture (with just one server obviously).
>
> This is "kea1" (192.168.99.10/24):
> {
> "Dhcp4": {
> "interfaces-config": {
> "interfaces": ["ens3" ]
> },
>
> "control-socket": {
> "socket-type": "unix",
> "socket-name": "/tmp/kea-dhcp4-ctrl.sock"
> },
>
> "lease-database": {
> "type": "memfile",
> "lfc-interval": 3600
> },
>
> "expired-leases-processing": {
> "reclaim-timer-wait-time": 10,
> "flush-reclaimed-timer-wait-time": 25,
> "hold-reclaimed-time": 3600,
> "max-reclaim-leases": 100,
> "max-reclaim-time": 250,
> "unwarned-reclaim-cycles": 5
> },
>
> "renew-timer": 900,
> "rebind-timer": 1800,
> "valid-lifetime": 3600,
>
> "option-data": [
> {
> "name": "domain-name-servers",
> "data": "192.168.99.1, 192.168.122.1"
> },
>
> {
> "name": "domain-search",
> "data": "keatest,localdomain,lowtech,lxd"
> },
> {
> "name": "default-ip-ttl",
> "data": "0xf0"
> }
> ],
>
> "client-classes": [
> {
> "name": "voip",
>
> "test": "substring(option[60].hex,0,6) == 'Aastra'",
>
> "next-server": "192.0.2.254",
> "server-hostname": "hal9000",
> "boot-file-name": "/dev/null"
>
> }
> ],
>
> "hooks-libraries": [
> {
> "library":
> "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so",
> "parameters": { }
> },
> {
> "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so",
> "parameters": {
> "high-availability": [{
> "this-server-name": "kea1",
> "mode": "load-balancing",
> "heartbeat-delay": 10000,
> "max-ack-delay": 5000,
> "max-unacked-clients": 5,
> "peers": [{
> "name": "kea1",
> "url": "http://192.168.99.10:8000/",
> "role": "primary",
> "auto-failover": true
> },
> {
> "name": "kea2",
> "url": "http://192.168.99.9:8000/",
> "role": "secondary",
> "auto-failover": true
> }]
> }]
> }
> }
> ],
>
> "subnet4": [
> {
> "subnet": "192.168.99.0/24",
> "pools": [
> {
> "pool": "192.168.99.100 - 192.168.99.149",
> "client-class": "HA_server1"
> },
> {
> "pool": "192.168.99.150 - 192.168.99.199",
> "client-class": "HA_server2"
> }
> ],
> "option-data": [
> {
> "name": "routers",
> "data": "192.168.99.1"
> }
> ]
> }
> ],
>
> "loggers": [
> {
> "name": "kea-dhcp4",
> "output_options": [
> {
> "output": "/var/log/kea/kea-dhcp4.log"
> }
> ],
> "severity": "INFO",
>
> "debuglevel": 0
> }
> ]
> }
> }
>
>
> The diff between that and kea2's config is:
> $ diff -u /etc/kea/kea-dhcp4.conf kea2
> --- /etc/kea/kea-dhcp4.conf 2020-02-12 13:42:05.385806455 -0300
> +++ kea2 2020-02-12 15:12:32.405941588 -0300
> @@ -65,7 +65,7 @@
> "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so",
> "parameters": {
> "high-availability": [{
> - "this-server-name": "kea1",
> + "this-server-name": "kea2",
> "mode": "load-balancing",
> "heartbeat-delay": 10000,
> "max-ack-delay": 5000,
>
> startup, dhcp request, shutdown logs at:
> kea1: https://paste.ubuntu.com/p/qRrr8p9c4M/
> kea2: https://paste.ubuntu.com/p/3Zh2dfMzRN/
More information about the Kea-users
mailing list