installation report on debian wheezy

Michael Richardson mcr at sandelman.ca
Wed Sep 10 01:43:13 UTC 2014


A power outage blew up a disk, taking out my asterisk server (mostly backed
up), but it was rather old, so I'm replacing it.  It is also the DHCPv4 for
my home "media" / "phone" VLAN, so I thought I'd try kea.  Why not get names
into my DNS for the phones and WII, and the like...

I did a git checkout, git checkout -b kea-0.9 origin/kea-0.9.
I initially ran "autoconf", but that failed, read the instructions and ran:
   autoreconf --install

I needed 
  apt-get install liblog4cplus-dev
to get around:

  checking log4cplus/logger.h usability... no
  checking log4cplus/logger.h presence... no
  checking for log4cplus/logger.h... no
  configure: error: Missing required header files.

having read some things, I thought I'd install libbotan1.10-dev too.

It seems that "sudo make install" on results a stack of things 
being relinked again by libtool. I don't know why, they were already
build.  This is a problem if I want to build on one machine and install onto
another machine using a (read-only) NFS/SSHFS mount. 

In the end, I had to install a devel environment on my compiler-free target
machine, and build there, which significantly upset me, as the set -dev
packages I needed was large and difficult to determine.

I recommend making debian (which likely will run on Ubuntu, but not VV), dpkg
available via a repository available for KEA if you want people to try it
out.  Since building it seems to require a bunch of packages (such as botan
needing libbz2 to be properly detected), it might be worth having (in
addition), a virtual package that simply Pre-Depends upon all the things
needed to build.  That way I can install "kea-dev-depends" as a package, and
then build from git tree. 

here is what wound up being installed (grepping for -dev packages)
libbison-dev:i386
libboost-dev
libboost1.49-dev
libbotan1.10-dev
libbz2-dev:i386
libc-dev-bin
libc6-dev:i386
libgmp-dev:i386
libgmp3-dev
liblog4cplus-dev
libltdl-dev:i386
libssl-dev
libstdc++6-4.4-dev
libstdc++6-4.7-dev
linux-libc-dev:i386
zlib1g-dev:i386

Comments on things, once I got things installed.

1) this is the example installed:

# Below an example of the simple subnet declaration. Uncomment to
# enable it.
  "subnet4": [
#  {    "subnet": "192.0.2.0/24",
#       "pool": [ "192.0.2.1 - 192.0.2.200" ] }
  ]

this is what http://git.kea.isc.org/~tester/kea/guide/kea-guide.html says:
"Dhcp4": {
    "subnet4": [
        "subnet": "192.0.2.0/24",
        "pools": [
	    {
	        "pool": "192.0.2.10 - 192.0.2.20"
            }
        ],
        ...
    ]
}

note "pools" vs "pool".  The installed example is wrong.

2) It appears that comments # are valid only in column 0.  That's really
   annoying. Really really really really annoying.  I understand that
   comments probably not valid JSON, period.

3) it is not obvious what userid kea is going to run as, or if it has to run
   as root, or if there is any priveledge seperation.

4) despite repeated attempts, I can't make it like my config:

# DHCPv4 configuration starts here.
"Dhcp4":
{
# Add names of interfaces to listen on.
  "interfaces": [ "eth0" ],

# Use Memfile lease database backend to store leases in a CSV file.
  "lease-database": {
    "type": "memfile"
  },

# Global (inherited by all subnets) lease lifetime is mandatory parameter.
  "valid-lifetime": 4000,

# Below an example of the simple subnet declaration. Uncomment to
# enable it.
  "subnet4": [
       "subnet": "172.30.55.0/24",               <--- seems to be line 25.
       "pools": [
          { "pool": "172.30.55.192/26" }
       ]
  ]
},

halibut-[~/kea] mcr 10106 %sudo keactrl start       
INFO/keactrl: Starting kea-dhcp4 -c /sandel/etc/kea/kea.conf
INFO/keactrl: Starting kea-dhcp6 -c /sandel/etc/kea/kea.conf
2014-09-09 20:16:58.557 ERROR [kea-dhcp4.dhcp4/10390] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/sandel/etc/kea/kea.conf': ':' read, one of ",]" expected in /sandel/etc/kea/kea.conf:25:17
INFO/keactrl: Starting kea-dhcp-ddns -c /sandel/etc/kea/kea.conf


5) okay, I played some more, and with:

  "Dhcp4":
{
# Add names of interfaces to listen on.
  "interfaces": [ "eth0" ],

# Use Memfile lease database backend to store leases in a CSV file.
  "lease-database": {
    "type": "memfile"
  },

# Global (inherited by all subnets) lease lifetime is mandatory parameter.
  "valid-lifetime": 4000,

# Below an example of the simple subnet declaration. Uncomment to
# enable it.
  "subnet4": {
       "subnet": "172.30.55.0/24",
       "pools": [
          { "pool": "172.30.55.192/26" }
       ]
  }
},
 

(that is, subnet4, takes a directionary, not an array, I get:

halibut-[~/kea] mcr 10113 %sudo keactrl start       
INFO/keactrl: Starting kea-dhcp4 -c /sandel/etc/kea/kea.conf
INFO/keactrl: Starting kea-dhcp6 -c /sandel/etc/kea/kea.conf
2014-09-09 20:19:37.726 INFO  [kea-dhcp4.dhcpsrv/10541] DHCPSRV_CFGMGR_ADD_IFACE listening on interface eth0
2014-09-09 20:19:37.741 INFO  [kea-dhcp4.dhcpsrv/10541] DHCPSRV_MEMFILE_DB opening memory file lease database: type=memfile universe=4
2014-09-09 20:19:37.749 INFO  [kea-dhcp4.dhcpsrv/10541] DHCPSRV_MEMFILE_LEASES_RELOAD4 reloading leases from /sandel/var/kea/kea-leases4.csv
2014-09-09 20:19:37.760 ERROR [kea-dhcp4.dhcp4/10541] DHCP4_PARSER_FAIL failed to create or run parser for configuration element subnet4: listValue() called on non-list Element
2014-09-09 20:19:37.763 ERROR [kea-dhcp4.dhcp4/10541] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /sandel/etc/kea/kea.conf, reason: listValue() called on non-list Element
2014-09-09 20:19:37.786 ERROR [kea-dhcp4.dhcp4/10541] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/sandel/etc/kea/kea.conf': listValue() called on non-list Element
INFO/keactrl: Starting kea-dhcp-ddns -c /sandel/etc/kea/kea.conf

which sort of seems to be an improvement, because it's no longer a parser
error, but rather an semantic error, but it seemto suggest that the [] was
right, but something about it was really wrong.

AHA, the installed example CONFIG is CORRECT, but the documentation is
totally borked.  [] around :-items would be invalid JSON anyway.

AHA 2... trailing , on dictionaries is not accepted.  
I'm pretty sure that Javascript deals with it just fine, btw.

Finally, got it working. WII liked it, phones liked it.
WTF... I gotta write the options out like that... wow... nobody gonna live
with that long.

-- 
]               Never tell me the odds!                 | ipv6 mesh networks [ 
]   Michael Richardson, Sandelman Software Works        | network architect  [ 
]     mcr at sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [ 
	




-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-dev/attachments/20140909/41315fd4/attachment-0001.bin>


More information about the kea-dev mailing list