Send kea-dev mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/kea-dev
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of kea-dev digest..."
Today's Topics:
1. Hook "subnet4_select" called 5 times for one request
(Chaigneau, Nicolas)
2. Re: Hook "subnet4_select" called 5 times for one request
(Tomek Mrugalski)
----------------------------------------------------------------------
Message: 1
Date: Tue, 10 Feb 2015 13:55:23 +0000
From: "Chaigneau, Nicolas" <[email protected]>
To: "[email protected]" <[email protected]>
Subject: [kea-dev] Hook "subnet4_select" called 5 times for one
request
Message-ID:
<ab94b0b675bdf14189cd5a861db36c84194dc...@de-cm-mbx26.corp.capgemini.com>
Content-Type: text/plain; charset="us-ascii"
Hello,
Whenever a Discover a Request is processed, I noticed that the hook
"subnet4_select" is called 5 times.
More precisely, hooks are called in the following order:
- pkt4_receive
- subnet4_select
- lease4_select
- subnet4_select (4 times)
- pkt4_send
I suppose this is not the expected behavior ?
The debug traces for one request are the following:
2015-02-10 14:46:19.656 DEBUG [kea-dhcp4.dhcp4/22420] DHCP4_PACKET_RECEIVED
REQUEST (type 3) packet received on interface eth0.102
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.dhcp4/22420] DHCP4_QUERY_DATA received
packet type 3, data is <localAddr=10.163.216.228:67
remoteAddr=10.163.216.250:67, msgtype=3, transid=0x295cd512
type=53, len=1:
>
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.hooks/22420] HOOKS_CALLOUT_CALLED
hooks library with index 1 has called a callout on hook pkt4_receive that has
address 0x7f06097bdf0c
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.hooks/22420] HOOKS_CALLOUT_CALLED
hooks library with index 1 has called a callout on hook subnet4_select that has
address 0x7f06097c19e0
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.dhcp4/22420] DHCP4_SUBNET_SELECTED the
10.156.0.0/15 subnet was selected for client assignment
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.dhcpsrv/22420]
DHCPSRV_MEMFILE_GET_SUBID_HWADDR obtaining IPv4 lease for subnet ID 1001 and
hardware address hwtype=1 4e:43:48:00:00:01
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.dhcpsrv/22420]
DHCPSRV_MEMFILE_GET_ADDR4 obtaining IPv4 lease for address 10.156.0.2
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.hooks/22420] HOOKS_CALLOUT_CALLED
hooks library with index 1 has called a callout on hook lease4_select that has
address 0x7f06097c25bc
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.dhcpsrv/22420]
DHCPSRV_MEMFILE_ADD_ADDR4 adding IPv4 lease with address 10.156.0.2
2015-02-10 14:46:19.657 DEBUG [kea-dhcp4.dhcpsrv/22420]
DHCPSRV_MEMFILE_GET_ADDR4 obtaining IPv4 lease for address 10.156.0.2
2015-02-10 14:46:19.658 DEBUG [kea-dhcp4.dhcp4/22420] DHCP4_LEASE_ALLOC lease
10.156.0.2 has been allocated for client-id (no client-id), hwaddr hwtype=1
4e:43:48:00:00:01
2015-02-10 14:46:19.658 DEBUG [kea-dhcp4.hooks/22420] HOOKS_CALLOUT_CALLED
hooks library with index 1 has called a callout on hook subnet4_select that has
address 0x7f06097c19e0
2015-02-10 14:46:19.658 DEBUG [kea-dhcp4.hooks/22420] HOOKS_CALLOUT_CALLED
hooks library with index 1 has called a callout on hook subnet4_select that has
address 0x7f06097c19e0
2015-02-10 14:46:19.658 DEBUG [kea-dhcp4.hooks/22420] HOOKS_CALLOUT_CALLED
hooks library with index 1 has called a callout on hook subnet4_select that has
address 0x7f06097c19e0
2015-02-10 14:46:19.658 DEBUG [kea-dhcp4.hooks/22420] HOOKS_CALLOUT_CALLED
hooks library with index 1 has called a callout on hook subnet4_select that has
address 0x7f06097c19e0
2015-02-10 14:46:19.658 DEBUG [kea-dhcp4.hooks/22420] HOOKS_CALLOUT_CALLED
hooks library with index 1 has called a callout on hook pkt4_send that has
address 0x7f06097c1338
2015-02-10 14:46:19.658 DEBUG [kea-dhcp4.dhcp4/22420] DHCP4_RESPONSE_DATA
responding with packet type 5, data is <localAddr=10.163.216.228:67
remoteAddr=10.163.216.250:67, msgtype=5, transid=0x295cd512
type=1, len=4:
type=3, len=4: 10.156.0.1
type=6, len=4: 80.10.46.232
type=15, len=18: 6f:72:61:6e:67:65:2d:68:6f:74:73:70:6f:74:2e:63:6f:6d
type=51, len=4:
type=53, len=1: 05
type=54, len=4: 10.163.216.228
type=58, len=4:
type=59, len=4:
>
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is intended only for the person to whom
it is addressed. If you are not the intended recipient, you are not authorized
to read, print, retain, copy, disseminate, distribute, or use this message or
any part thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
------------------------------
Message: 2
Date: Tue, 10 Feb 2015 16:14:43 +0100
From: Tomek Mrugalski <[email protected]>
To: [email protected]
Subject: Re: [kea-dev] Hook "subnet4_select" called 5 times for one
request
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
On 10.02.2015 14:55, Chaigneau, Nicolas wrote:
> Hello,
>
> Whenever a Discover a Request is processed, I noticed that the hook
> "subnet4_select" is called 5 times.
>
> More precisely, hooks are called in the following order:
> - pkt4_receive
> - subnet4_select
> - lease4_select
> - subnet4_select (4 times)
> - pkt4_send
>
> I suppose this is not the expected behavior ?
We are aware of this inefficiency, just never got to address it. The
Dhcpv4Srv::selectSubnet method well predates the concept of hooks.
Fortunately, that's one of the optimisations that is easy to do.
I just created #3707 to address this inefficiency.
Tomek
------------------------------
_______________________________________________
kea-dev mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-dev
End of kea-dev Digest, Vol 11, Issue 5
**************************************