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

Norberto Nuñez Norberto.Nunez at personal.com.py
Mon Jul 18 13:27:14 UTC 2022


Hi Siddhesh.

the "url" parameter must have the interface IP address of each server, not the local loopback.

Kind regards


[1648137216676]
Norberto Isaac Núñez
Ingeniería de servicios, Núcleo S.A.
Máximo Lira n° 522, Asunción.
Tel.: +595212199396<tel:+595212199396>, +595971577190<tel:+595971577190>
eMail: Norberto.Nunez at personal.com.py<mailto:norberto.nunez at personal.com.py>
Web: https://www.personal.com.py
________________________________
De: Kea-users <kea-users-bounces at lists.isc.org> en nombre de Siddhesh Dindorkar <siddhesh.p.d at gmail.com>
Enviado: lunes, 18 de julio de 2022 3:39:12
Para: kea-users at lists.isc.org
Asunto: [Kea-users] kea sync questions in hot-standby mode

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

________________________________

AVISO LEGAL: Esta información es privada y confidencial y está dirigida únicamente a su destinatario. Si usted no es el destinatario original de este mensaje y por este medio pudo acceder a dicha información por favor elimine el mensaje. La distribución o copia de este mensaje está estrictamente prohibida. Esta comunicación es sólo para propósitos de información y no debe ser considerada como propuesta, aceptación ni como una declaración de voluntad oficial de NUCLEO S.A. La transmisión de e-mails no garantiza que el correo electrónico sea seguro o libre de error. Por consiguiente, no manifestamos que esta información sea completa o precisa. Toda información está sujeta a alterarse sin previo aviso.

This information is private and confidential and intended for the recipient only. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and shall not be regarded neither as a proposal, acceptance nor as a statement of will or official statement from NUCLEO S.A. . Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220718/4883ac31/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OutlookEmoji-1648137216676aec0f0d6-bc63-401c-9da4-0a5f358091cd.png
Type: image/png
Size: 13127 bytes
Desc: OutlookEmoji-1648137216676aec0f0d6-bc63-401c-9da4-0a5f358091cd.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220718/4883ac31/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OutlookEmoji-1648137216676c7bad980-4504-427a-87a4-e0aa22ca1b31.png
Type: image/png
Size: 13127 bytes
Desc: OutlookEmoji-1648137216676c7bad980-4504-427a-87a4-e0aa22ca1b31.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220718/4883ac31/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OutlookEmoji-16481372166763b706cc2-bde4-41e0-bf30-0baf515113d0.png
Type: image/png
Size: 13127 bytes
Desc: OutlookEmoji-16481372166763b706cc2-bde4-41e0-bf30-0baf515113d0.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220718/4883ac31/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OutlookEmoji-1648137216676ca5be1fb-4730-4351-b689-e0daf1eca164.png
Type: image/png
Size: 13127 bytes
Desc: OutlookEmoji-1648137216676ca5be1fb-4730-4351-b689-e0daf1eca164.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220718/4883ac31/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OutlookEmoji-1648137216676e10d5d3a-abc7-4e6d-bd9f-195eece6d229.png
Type: image/png
Size: 13127 bytes
Desc: OutlookEmoji-1648137216676e10d5d3a-abc7-4e6d-bd9f-195eece6d229.png
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220718/4883ac31/attachment-0009.png>


More information about the Kea-users mailing list