[Kea-users] No Host Reservations from MariaDB on OpenBSD 5.8

Marcin Siodelski marcin at isc.org
Tue Aug 16 14:07:21 UTC 2016


On 07.08.2016 13:22, Christoffer Jönsson wrote:
> Hello! I have a problem where host reservations are not pulled from the
> database.
> 
> This is how I installed Kea and setup mysql:
> 
> using this guide: https://kea.isc.org/wiki/SystemNotesOpenBSD
> 
> then added to kea.conf and created database with tables:
> 
> [...]"subnet": "10.0.0.0/24",
>        "id": 1,[...]
> 
>  "lease-database": {
>     "type": "mysql",
>     "name": "kea",
>     "host" : "",
>     "user": "kea",
>     "password": "kea"
>   },
> 
> "hosts-database": {
>     "type": "mysql",
>     "name": "kea",
>     "host" : "",
>     "user": "kea",
>     "password": "kea"
>   },
> 
> It connects and adds leases to database:
> 
> 2016-08-07 12:56:18.838 INFO  [kea-dhcp4.dhcpsrv/21651] DHCPSRV_MYSQL_DB
> opening MySQL lease database: name=kea password=***** type=mysql
> universe=4 user=kea
> 2016-08-07 12:56:18.844 INFO  [kea-dhcp4.dhcpsrv/21651]
> DHCPSRV_MYSQL_HOST_DB opening MySQL hosts database: name=kea
> password=***** type=mysql universe=4 user=kea
> 
> Added reservation:
> 
> START TRANSACTION;
> SET @ipv4_reservation='10.0.0.150';
> SET @hostname = 'test';
> SET @identifier_type='hw-address';
> SET @identifier_value='66:38:32:38:38:38';
> SET @dhcp4_subnet_id=1;
> 
> INSERT INTO hosts (dhcp_identifier,
>                    dhcp_identifier_type,
> 		   dhcp4_subnet_id,
>                    ipv4_address,
>                    hostname)
> VALUES (UNHEX(REPLACE(@identifier_value, ':', '')),
> 	(SELECT type FROM host_identifier_type WHERE name=@identifier_type),
>         @dhcp4_subnet_id,
>         INET_ATON(@ipv4_reservation),
>         @hostname);
> 
> COMMIT;
> 
> Client still uses old lease until reservation is added in kea.conf.
> 
> Is there something I'm missing? Thanks!
> 
> 
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
> 

Hi Christoffer,

You may be hitting the problem described in Kea ticket
http://kea.isc.org/ticket/4544. Unfortunately, this is still on our todo
list and will be released with Kea 1.1. If you're ok with working on
unreleased Kea version, the fix should be available on github this month.

Marcin Siodelski
ISC



More information about the Kea-users mailing list