Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 594
    • Issues 594
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 61
    • Merge requests 61
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • KeaKea
  • Issues
  • #2799
Closed
Open
Issue created Mar 20, 2023 by Wlodzimierz Wencel@wlodekMaintainer

Kea HA can't start in MT mode

Using current master Kea is unable to start HA service when it is configured with MT mode.

2023-03-20 09:31:48.578 ERROR [kea-dhcp4.ha-hooks/7532.140440458037120] HA_DHCP4_START_SERVICE_FAILED failed to start DHCPv4 HA service in dhcp4_srv_configured callout: HttpClient thread_pool_size must be zerowhen Kea core multi-threading is disabled
2023-03-20 09:31:48.578 ERROR [kea-dhcp4.callouts/7532.140440458037120] HOOKS_CALLOUT_ERROR error returned by callout on hook dhcp4_srv_configured registered by library with index 2 (callout address 0x7fbacf2c50f0) (callout duration 0.213 ms)
2023-03-20 09:31:48.578 DEBUG [kea-dhcp4.callouts/7532.140440458037120] HOOKS_CALLOUTS_COMPLETE completed callouts for hook dhcp4_srv_configured (total callouts duration: 0.213 ms)
2023-03-20 09:31:48.579 WARN  [kea-dhcp4.dhcp4/7532.140440458037120] DHCP4_MULTI_THREADING_INFO enabled: yes, number of threads: 2, queue size: 2
2023-03-20 09:31:48.579 INFO  [kea-dhcp4.dhcp4/7532.140440458037120] DHCP4_STARTED Kea DHCPv4 server version 2.3.6-git started

There are several issues:

  • most important is Kea can't enable HA service
  • such error in HA hook should result with failure on startup instead of Kea starting except HA hook
  • small typo in log message must be zerowhen Kea core

Config used to trigger this error:

{
    "Dhcp4": {
        "option-data": [],
        "hooks-libraries": [
            {
                "library": "/home/wlodek/installed/git/lib/kea/hooks/libdhcp_lease_cmds.so"
            },
            {
                "library": "/home/wlodek/installed/git/lib/kea/hooks/libdhcp_ha.so",
                "parameters": {
                    "high-availability": [
                        {
                            "peers": [
                                {
                                    "auto-failover": true,
                                    "name": "server1",
                                    "role": "primary",
                                    "url": "http://192.168.51.3:8003/"
                                },
                                {
                                    "auto-failover": true,
                                    "name": "server2",
                                    "role": "secondary",
                                    "url": "http://192.168.51.4:8003/"
                                }
                            ],
                            "state-machine": {
                                "states": []
                            },
                            "mode": "load-balancing",
                            "heartbeat-delay": 1000,
                            "max-ack-delay": 100,
                            "max-response-delay": 4000,
                            "max-unacked-clients": 2,
                            "this-server-name": "server2",
                            "multi-threading": {
                                "enable-multi-threading": true,
                                "http-dedicated-listener": true,
                                "http-listener-threads": 0,
                                "http-client-threads": 0
                            }
                        }
                    ]
                }
            }
        ],
        "shared-networks": [],
        "subnet4": [
            {
                "subnet": "192.168.50.0/24",
                "pools": [
                    {
                        "pool": "192.168.50.1-192.168.50.30",
                        "client-class": "HA_server1"
                    },
                    {
                        "pool": "192.168.50.100-192.168.50.130",
                        "client-class": "HA_server2"
                    }
                ],
                "interface": "enp0s9"
            }
        ],
        "interfaces-config": {
            "interfaces": [
                "enp0s9"
            ]
        },
        "control-socket": {
            "socket-type": "unix",
            "socket-name": "/home/wlodek/installed/git/var/run/kea/control_socket"
        },
        "renew-timer": 1000,
        "rebind-timer": 2000,
        "valid-lifetime": 4000,
        "loggers": [
            {
                "name": "kea-dhcp4",
                "output_options": [
                    {
                        "output": "/home/wlodek/installed/git/var/log/kea.log"
                    }
                ],
                "severity": "DEBUG",
                "debuglevel": 99
            }
        ],
        "lease-database": {
            "type": "memfile"
        },
        "multi-threading": {
            "enable-multi-threading": true,
            "thread-pool-size": 0,
            "packet-queue-size": 0
        }
    }
}

entire log: kea.log

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking