[Kea-users] Need help in MySQL queries - KEA

Nandan Adhikari nandan.adhikari007 at gmail.com
Wed Dec 28 09:56:19 UTC 2016

Thanks a lot for the suggestions.

What I am specifically looking for is a way to modify/delete existing host
reservations or from lease tables. As Klaus suggested to use KEA itself for
insertion into lease tables, so I was checking out host reservation section
of the guide. But I am unable to find any table where I can see the current

Can someone suggest how we can modify current host reservations instead of
modifying the .conf file and doing restart?

On Tue, Dec 27, 2016 at 8:39 PM, Igor Smitran <sigor at blic.net> wrote:

> You can also use hooks and get all the lease data when lease is in select,
> renew, release, decline, expire and recover state.
> More about that you can see here:
> http://git.kea.isc.org/~tester/kea/doxygen/de/df3/dhcpv4Hooks.html
> Igor
> On 12/27/2016 11:49 AM, Nandan Adhikari wrote:
> Hi Igor, I am trying to have similar kind of functionality which OMAPI
> gives for ISC DHCP.
> Its because we have existing setup in ISC DHCP, where we manage the DHCP
> using OMAPI which gives the APIs like 'host_add' or 'host_delete'. I was
> trying to have something similar to it. The IP/subnet pool is being managed
> by another system here, and therefore what is needed is to somehow insert a
> lease when a VM/instance comes up and delete that lease when VM is
> destroyed.
> Thanks Klaus for the reply. I was actually trying to manage leases, which
> I think better would be to use host reservation. I will give it a try.
> On Tue, Dec 27, 2016 at 3:50 PM, Igor Smitran <sigor at blic.net> wrote:
>> Galera MySQL is MySQL cluster. Kea already has mysql support and already
>> does all the work you mentioned.
>> Why would you write another API for functionality that is already
>> implemented?
>> On 12/27/2016 08:47 AM, Nandan Adhikari wrote:
>> Hi,
>> I am writing a service which assigns IP addresses to newly provisioned
>> VMs or physical machines from a pre-defined IP pool. I want to use KEA with
>> Galera MySQL backend. The problem I am facing is that there is no docs/info
>> regarding the Table schema details or SQL queries to do common tasks like:
>> 1) lease lookup by mac/ip
>> 2) reservation lookup by mac/ip
>> 3) add new lease
>> 4) delete an existing lease
>> Here is what I am thinking for above APIs:
>> 1) lease lookup by mac: (SELECT INET_NTOA(address) as address,
>> HEX(hwaddr) as hwaddr, hostname from lease4 where HEX(hwaddr)= ?", macid)
>> If you could advice me on how to write such API's to do basic management.
>> --
>> Thanks & warm wishes,
>> Nandan Adhikari
>> _______________________________________________
>> Kea-users mailing listKea-users at lists.isc.orghttps://lists.isc.org/mailman/listinfo/kea-users
>> _______________________________________________ Kea-users mailing list
>> Kea-users at lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users
> --
> Thanks & warm wishes, Nandan Adhikari

Thanks & warm wishes,
Nandan Adhikari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20161228/de95b482/attachment.htm>

More information about the Kea-users mailing list