[kea-dev] [0.9.1-beta1] Issue with config reload and IPv4 sockets

Marcin Siodelski marcin at isc.org
Wed Feb 25 07:25:51 UTC 2015



On 02/25/15 00:08, Tomek Mrugalski wrote:
> On 23/02/15 16:34, Chaigneau, Nicolas wrote:
>> Hello,
>>
>> When attempting to reload Kea configuration through a HUP signal, for example with:
>>
>> kill -HUP $(pidof kea-dhcp4)
>>
>> The log file shows the following errors:
>>
>> 	2015-02-23 16:29:08.944 INFO  [kea-dhcp4.dhcp4/17947] DHCP4_DYNAMIC_RECONFIGURATION initiate server reconfiguration using file: /mnt/wifi/users/NCH/src-owa/src-kea-qualif/etc/kea1.conf, after receiving SIGHUP signal
>> 	2015-02-23 16:29:08.945 INFO  [kea-dhcp4.dhcpsrv/17947] DHCPSRV_CFGMGR_USE_ADDRESS listening on address 10.163.216.230, on interface eth0.102
>> 	2015-02-23 16:29:08.945 INFO  [kea-dhcp4.dhcpsrv/17947] DHCPSRV_CFGMGR_SOCKET_TYPE_SELECT using socket type udp
>> 	2015-02-23 16:29:08.945 INFO  [kea-dhcp4.dhcpsrv/17947] DHCPSRV_MEMFILE_DB opening memory file lease database: lfc-interval=60 name=/var/opt/data/flat/mwpdhcp/ramdisk1/kea1-leases4.csv persist=true type=memfile universe=4
>> 	2015-02-23 16:29:08.946 INFO  [kea-dhcp4.dhcpsrv/17947] DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases from file /var/opt/data/flat/mwpdhcp/ramdisk1/kea1-leases4.csv.2
>> 	2015-02-23 16:29:08.946 INFO  [kea-dhcp4.dhcpsrv/17947] DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases from file /var/opt/data/flat/mwpdhcp/ramdisk1/kea1-leases4.csv
>> 	2015-02-23 16:29:08.946 INFO  [kea-dhcp4.dhcpsrv/17947] DHCPSRV_MEMFILE_LFC_SETUP setting up the Lease File Cleanup interval to 60 sec
>> 	2015-02-23 16:29:08.946 INFO  [kea-dhcp4.dhcp4/17947] DHCP4_CONFIG_NEW_SUBNET a new subnet has been added to configuration: 10.164.0.0/15 with params: t1=900, t2=1575, valid-lifetime=1800
>> 	2015-02-23 16:29:08.946 INFO  [kea-dhcp4.dhcp4/17947] DHCP4_CONFIG_COMPLETE DHCPv4 server has completed configuration: added IPv4 subnets: 1; DDNS: disabled
>> 	2015-02-23 16:29:08.946 ERROR [kea-dhcp4.dhcp4/17947] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /mnt/wifi/users/NCH/src-owa/src-kea-qualif/etc/kea1.conf, reason: Error while processing command 'config-reload':it is not allowed to set new packet filter when there are open IPv4 sockets - need to close them first, params: '{ "hooks-libraries": [ "/mnt/wifi/users/NCH/src-owa/src-kea-qualif/hooks/libdhcp_nch_hook.so" ], "interfaces-config": { "dhcp-socket-type": "udp", "interfaces": [ "eth0.102/10.163.216.230" ] }, "lease-database": { "lfc-interval": 60, "name": "/var/opt/data/flat/mwpdhcp/ramdisk1/kea1-leases4.csv", "persist": true, "type": "memfile" }, "rebind-timer": 1575, "renew-timer": 900, "subnet4": [ { "id": 1001, "pools": [ { "pool": "10.164.0.2 - 10.165.255.254" } ], "relay": { "ip-address": "10.163.216.250" }, "subnet": "10.164.0.0/15" } ], "valid-lifetime": 1800 }'
>> 	2015-02-23 16:29:08.946 ERROR [kea-dhcp4.dhcp4/17947] DHCP4_DYNAMIC_RECONFIGURATION_FAIL dynamic server reconfiguration failed with file: /mnt/wifi/users/NCH/src-owa/src-kea-qualif/etc/kea1.conf
> Nicolas and I looked into this matter further and it seems that the
> problem is in CfgIface::openSockets. The code calls
> iface_mgr.setMatchingPacketFilter() (line 77) before calling
> closeSockets() (line 131). Inside setMatchingPacketFilter() there's a
> call to setPacketFilter() which checks if there are open sockets and
> throws if there are any.
> 
> The simplest solution will be to move the call to closeSockets() to some
> place before the call to setMatchingPacketFilter().
> 
> I'll file in a ticket and develop the fix once I get back home, unless
> someone else wants to fix this sooner.
> 
> On a related note, this bug makes kea reconfiguration unusable. This is
> a regression (it used to be working in earlier kea versions). So I'd say
> it's rather highly visible. Fortunately, it's easy to fix.
> 
> Also, we need to extend our tests to better check reconfiguration.
> 

I submitted new ticket http://kea.isc.org/ticket/3730 to address this.

Marcin


More information about the kea-dev mailing list