<div dir="ltr">Hi,<div><br></div><div>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. </div><div>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:</div><div>rm -rf /var/lib/cassandra/*</div><div>This action is usually done when setting a distributed cluster, after configuring the nodes and before starting the nodes. Otherwise, some problems could occur.</div><div>The strange thing is that in your case, the script found keatest as a keyspace before you run kea-admin lease init.</div><div>Did you perform a manual initialization before kea-admin lease-init? (cqlsh -u <user> -p <password> -k <database> -f dhcpdb_create.cql)</div><div>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.</div><div>The leases are saved as signed integers. This is the reason why <span style="font-size:12.8px">192.0.2.1 is displayed as </span><span style="font-size:12.8px">-1073741311.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Regards,</span></div><div><span style="font-size:12.8px">Razvan</span></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 27, 2016 at 10:38 PM, Tomek Mrugalski <span dir="ltr"><<a href="mailto:tomasz@isc.org" target="_blank">tomasz@isc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On <a href="tel:25.05.2016%2002" value="+12505201602">25.05.2016 02</a>:11, Tomek Mrugalski wrote:<br>
> I was able to download your code, build cpp-driver, tweak the script to<br>
> point to the right place and then build Kea with Cassandra backend<br>
> enabled. I'm now learning how to set up Cassandra instance. Your<br>
> documentation was very helpful so far and I see it also covers<br>
> installation and setup, so I'm hopeful I'll be able to run some tests soon.<br>
</span>Just a status update for this week. The short version is: has some minor<br>
issues here and there, but it was nothing serious. And it works!<br>
<br>
The slightly longer is that I installed and set up Cassandra. So far I<br>
used a single cassandra node (running on my dev machine), so kept the<br>
replication factor to 1. As I understand it, this doesn't give me any<br>
redundancy, but makes it easier to test.<br>
<br>
I had some problems initializing the database. kea-init didn't work<br>
without doing make install first (that's a minor thing). After doing<br>
make install, the code didn't work either and complained about keatest<br>
having 6 tables:<br>
<br>
ERROR/kea-admin: Expected empty database keatest, but there are 6<br>
tables:<br>
<br>
keatest system_schema system_auth system system_distributed<br>
system_traces. Aborting.<br>
<br>
I'm still learning the basics, but I think this is a small bug in the<br>
kea-admin that uses DESCRIBE keyspaces; command, while it should say<br>
DESCRIBE tables; instead. I may be wrong about this one. Anyway, I have<br>
commented it out for now.<br>
<br>
The database has been initialized. They were some warnings, but they're<br>
not relevant for now (kept them in my notes, though).<br>
<br>
kea-admin lease-version dscsql<br>
<br>
properly reports schema version as 1.0.<br>
<br>
I have created an example Kea config and reported:<br>
DHCPSRV_DSCSQL_DB opening DataStax Cassandra lease database:<br>
contact_points=127.0.0.1 keyspace=keatest type=dscsql universe=4<br>
<br>
After that, a single client got IPv4 address. I then checked using<br>
csqlsh that the lease is in the database:<br>
<br>
> select * from keatest.lease4;<br>
<br>
For some reason it showed 192.0.2.1 address as -1073741311, but I<br>
presume it an issue with signed/usigned display. All other fields,<br>
including hwaddr are set properly.<br>
<br>
Ok, that's it for today. Will continue my tests and code review on Monday.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tomek<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><table style="font-family:'Times New Roman';margin:0px;padding:0px;border:0px;color:rgb(51,51,51)"><tbody><tr><td><img src="https://www.qualitance.com/Q48x48.gif" style="width:48px;padding-right:5px;vertical-align:middle"></td><td style="font-stretch:normal;font-size:11px;font-family:Verdana;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:5px"><strong>Razvan Becheriu</strong> <span style="color:rgb(190,190,190)">|</span> senior software engineer <span style="color:rgb(190,190,190)">|</span> QUALITANCE™<br><strong>RO:</strong> +00 (000) 000 000 <span style="color:rgb(190,190,190)">|</span> <strong>office:</strong> +40 (372) 944 741<br><a href="https://www.google.ro/maps/place/QUALITANCE/@44.433653,26.079464,17z/data=!4m6!1m3!3m2!1s0x40b1ff173c5bc0b9:0x7226343f810c7ede!2sQUALITANCE!3m1!1s0x40b1ff173c5bc0b9:0x7226343f810c7ede?hl=ro" style="text-decoration:none;color:rgb(51,51,51)" target="_blank">Opera Center bldg. 2, fl. 7-8, 2 Dr. Nicolae D. Staicovici, Bucharest 050556</a><br><a href="mailto:razvan.becheriu@qualitance.com" style="text-decoration:none;color:rgb(51,51,51)" target="_blank">razvan.becheriu@qualitance.com</a> <span style="color:rgb(190,190,190)">|</span> <a href="https://www.qualitance.com/" style="text-decoration:none;color:rgb(51,51,51)" target="_blank">www.qualitance.com</a></td></tr></tbody></table><table style="font-family:'Times New Roman';margin:0px;padding:0px;border:0px;color:rgb(51,51,51)"><tbody><tr><td style="font-stretch:normal;font-size:9px;font-family:Verdana;color:rgb(153,153,153)">--<br>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.</td></tr></tbody></table></div></div>
</div>