[Kea-users] kea sync questions in hot-standby mode

Siddhesh Dindorkar siddhesh.p.d at gmail.com
Mon Jul 18 07:39:12 UTC 2022


Hello,

We are using kea 1.8.2 in hot-standby mode. The problem I see is that if I
onboard a new standby server, I don't see the kea leases being synced to
the standby. Any new lease that active server dishes out post onboarding
the standby server is being synced, but not the existing ones that the
active  server had. If I execute status-get on the dhcp4, I see that both
the servers are in-touch. Not sure I am missing something basic. If I
restart kea-dhcp4 service, then I see those leases getting synced to the
standby server. Or if I explicitly execute the ha-sync command, then also I
see the leases getting synced. There aren't any significant error messages
in the kea logs files as well, apart from the below ones:

2022-07-18 07:01:50.452 DEBUG [kea-dhcp4.http/2623.140619754313216]
HTTP_BAD_SERVER_RESPONSE_RECEIVED bad response received when communicating
with http://127.0.0.1:8001/: unable to parse the body of the HTTP response:
error: unexpected character u in <string>:1:2 : current state: [ 1 END_ST ]
next event: [ 3 FAIL_EVT ]
upstream connect error or disconnect/reset before headers. reset reason:
connection failure
2022-07-18 07:01:50.452 WARN  [kea-dhcp4.ha-hooks/2623.140619754313216]
HA_HEARTBEAT_COMMUNICATIONS_FAILED failed to send heartbeat to
primary_server (http://127.0.0.1:8001/): unable to parse the body of the
HTTP response: error: unexpected character u in <string>:1:2 : current
state: [ 1 END_ST ] next event: [ 3 FAIL_EVT ]


Difference in state changes between bringing up a new server vs restart of
dhcp service:
New server:
2022-07-18 07:01:50.452 INFO  [kea-dhcp4.ha-hooks/2623.140619754313216]
HA_STATE_TRANSITION server transitions from WAITING to PARTNER-DOWN state,
partner state is UNDEFINED
2022-07-18 07:02:00.502 INFO  [kea-dhcp4.ha-hooks/2623.140619754313216]
HA_STATE_TRANSITION server transitions from PARTNER-DOWN to HOT-STANDBY
state, partner state is READY

Restart of dhcp service:
2022-07-18 06:57:06.105 INFO  [kea-dhcp4.ha-hooks/1483.139947883714048]
HA_STATE_TRANSITION server transitions from WAITING to SYNCING state,
partner state is HOT-STANDBY
2022-07-18 06:57:06.130 INFO  [kea-dhcp4.ha-hooks/1483.139947883714048]
HA_STATE_TRANSITION server transitions from SYNCING to READY state, partner
state is HOT-STANDBY
2022-07-18 06:57:06.130 INFO  [kea-dhcp4.ha-hooks/1483.139947883714048]
HA_STATE_TRANSITION server transitions from READY to HOT-STANDBY state,
partner state is HOT-STANDBY

kea hooks configuration:
"hooks-libraries": [
        {
            "library": "/usr/lib/kea/hooks/libdhcp_lease_cmds.so",
            "parameters": { }
        },
        {
            "library": "/usr/lib/kea/hooks/libdhcp_ha.so",
            "parameters": {
                "high-availability": [{
                    "this-server-name":"standby_server",
                    "mode": "hot-standby",
                    "heartbeat-delay": 10000,
                    "max-response-delay": 10000,
                    "max-unacked-clients": 0,
                    "peers": [
                    {
                       "name": "primary_server",
                        "url": "http://127.0.0.1:8001/",
                        "role": "primary"
                    },
                    {
                    "name": "standby_server",
                    "url": "http://127.0.0.1:8001/",
                    "role": "standby"
                    }]
                }]
            }
        },
        {
        "library": "/usr/lib/kea/hooks/libnsb_dhcp_hook.so",
        "parameters": { }
        },
        {
        "library": "/usr/lib/kea/hooks/libdhcp_stat_cmds.so",
        "parameters": { }
        }
        ],

Please let me know if you need any additional logs / information. Thank you
in advance for helping take a look into this.

Best,
Siddhesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220718/735df740/attachment.htm>


More information about the Kea-users mailing list