[kea-dev] kea apache cassandra/datastax cassandra

Razvan Becheriu razvan.becheriu at qualitance.com
Mon May 30 09:22:49 UTC 2016


Hi,

I must specify that there are some kea-admin differences from cassandra and
the other DB backeds. First major difference is that the database
(keyspace) is created by the kea-admin in the cassandra's case.
The fact that the script found several databases by default is because you
probably did not remove the default files created by cassandra at first run:
rm -rf /var/lib/cassandra/*
This action is usually done when setting a distributed cluster, after
configuring the nodes and before starting the nodes. Otherwise, some
problems could occur.
The strange thing is that in your case, the script found keatest as a
keyspace before you run kea-admin lease init.
Did you perform a manual initialization before kea-admin lease-init? (cqlsh
-u <user> -p <password> -k <database> -f dhcpdb_create.cql)
It seems that there is a issue with the fact that cqlsh list the keyspaces
on one single line. I will fix this today and commit the change. I'll leave
it up to you it is desired for the kea-admin to initialize the database as
well.
The leases are saved as signed integers. This is the reason why 192.0.2.1
is displayed as -1073741311.

Regards,
Razvan




On Fri, May 27, 2016 at 10:38 PM, Tomek Mrugalski <tomasz at isc.org> wrote:

> On 25.05.2016 02:11, Tomek Mrugalski wrote:
> > I was able to download your code, build cpp-driver, tweak the script to
> > point to the right place and then build Kea with Cassandra backend
> > enabled. I'm now learning how to set up Cassandra instance. Your
> > documentation was very helpful so far and I see it also covers
> > installation and setup, so I'm hopeful I'll be able to run some tests
> soon.
> Just a status update for this week. The short version is: has some minor
> issues here and there, but it was nothing serious. And it works!
>
> The slightly longer is that I installed and set up Cassandra. So far I
> used a single cassandra node (running on my dev machine), so kept the
> replication factor to 1. As I understand it, this doesn't give me any
> redundancy, but makes it easier to test.
>
> I had some problems initializing the database. kea-init didn't work
> without doing make install first (that's a minor thing). After doing
> make install, the code didn't work either and complained about keatest
> having 6 tables:
>
>   ERROR/kea-admin: Expected empty database keatest, but there are 6
>   tables:
>
>   keatest  system_schema  system_auth  system  system_distributed
>   system_traces. Aborting.
>
> I'm still learning the basics, but I think this is a small bug in the
> kea-admin that uses DESCRIBE keyspaces; command, while it should say
> DESCRIBE tables; instead. I may be wrong about this one. Anyway, I have
> commented it out for now.
>
> The database has been initialized. They were some warnings, but they're
> not relevant for now (kept them in my notes, though).
>
> kea-admin lease-version dscsql
>
> properly reports schema version as 1.0.
>
> I have created an example Kea config and reported:
> DHCPSRV_DSCSQL_DB opening DataStax Cassandra lease database:
> contact_points=127.0.0.1 keyspace=keatest type=dscsql universe=4
>
> After that, a single client got IPv4 address. I then checked using
> csqlsh that the lease is in the database:
>
> > select * from keatest.lease4;
>
> For some reason it showed 192.0.2.1 address as -1073741311, but I
> presume it an issue with signed/usigned display. All other fields,
> including hwaddr are set properly.
>
> Ok, that's it for today. Will continue my tests and code review on Monday.
>
> Tomek
>



-- 
*Razvan Becheriu*  |  senior software engineer  |  QUALITANCE™
*RO:* +00 (000) 000 000  |  *office:* +40 (372) 944 741
Opera Center bldg. 2, fl. 7-8, 2 Dr. Nicolae D. Staicovici, Bucharest 050556
<https://www.google.ro/maps/place/QUALITANCE/@44.433653,26.079464,17z/data=!4m6!1m3!3m2!1s0x40b1ff173c5bc0b9:0x7226343f810c7ede!2sQUALITANCE!3m1!1s0x40b1ff173c5bc0b9:0x7226343f810c7ede?hl=ro>
razvan.becheriu at qualitance.com  |  www.qualitance.com
--
The information contained in this email is confidential. It is intended
only for the stated addressee and access to it by any other person is
unauthorised. If you are not an addressee, you must not disclose, copy,
circulate or in another way use or reply to the information contained in
this email. Such unauthorised use may be unlawful. If you have received
this email in error, please notify the sender immediately and delete all
copies from your computer and network.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-dev/attachments/20160530/97ea92b4/attachment.html>


More information about the kea-dev mailing list