Re: [Kea-users] (no subject) && Subnets stored in mysql_cb don't consistently work

2019-12-10 Thread Chad Catlett



> On Dec 10, 2019, at 15:50, Mike Carlson  wrote:
> 
> For greater visibility, I'm posting here, as I have also submitted a gitlab 
> issue here:
> https://gitlab.isc.org/isc-projects/kea/issues/1047
> 
> The tl;dr is Kea DHCP4 is not sending subnet options to clients and we don't 
> know why.
> 
> We have paid for the premier hooks, so were running kea with the mysql 
> configuration backend for hosts, subnets and leases. This is a dhcp4 only 
> environment.
> 
> Our environment consists of around 300 subnets
> 
> We have a test host with a out of band management device that is set to use 
> our new kea server via dhcp helper address.
> 
> If we update kea, via posting a subnet config to the agent controller, for 
> this management network, we can restart the out-of-band management device and 
> it gets an address and a gateway
> 
> If we add a few more subnets, again, posting a subnet config to the agent 
> controller, we can restart the OOB device and it gets an IP address and a 
> gateway
> 
> This is where things get weird.
> 
> If we add all 300+ subnets, and restart the OOB device, it does not get a 
> gateway. It gets a leased ip address, but no subnet options.
> 
> Our packet captures during these events shows our OOB device requesting a 
> gateway, but kea never sends one or any of the other options
> 
> ___
> Kea-users mailing list
> Kea-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users

Sorry I did not realize that Mike was sending an email at the same time as me.

Both of our emails are about the same issue.

Chad
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] (no subject)

2019-01-17 Thread Jason Guy
Enabled the debugs, and something definitely looks wrong here...

2019-01-17 12:59:20.783 DEBUG [kea-dhcp4.packets/21850]
DHCP4_PACKET_RECEIVED [hwtype=1 34:17:eb:f6:5e:c4], cid=[no info],
tid=0x78768f6e: DHCPDISCOVER (type 1) received from 10.50.1.24 to
10.50.5.11 on interface eth0
2019-01-17 12:59:20.783 DEBUG [kea-dhcp4.packets/21850] DHCP4_QUERY_DATA
[hwtype=1 34:17:eb:f6:5e:c4], cid=[no info], tid=0x78768f6e, packet
details: local_address=10.50.5.11:67, remote_address=10.50.1.24:67,
msg_type=DHCPDISCOVER (1), transid=0x78768f6e,
options:
  type=012, len=007: "cumulus" (string)
  type=051, len=004: 7200 (uint32)
  type=053, len=001: 1 (uint8)
  type=055, len=014: 1(uint8) 28(uint8) 2(uint8) 3(uint8) 15(uint8)
6(uint8) 119(uint8) 12(uint8) 44(uint8) 47(uint8) 26(uint8) 121(uint8)
42(uint8) 239(uint8)
2019-01-17 12:59:20.783 DEBUG [kea-dhcp4.packets/21850]
DHCP4_SUBNET_SELECTED [hwtype=1 34:17:eb:f6:5e:c4], cid=[no info],
tid=0x78768f6e: the subnet with ID 24 was selected for client assignments
2019-01-17 12:59:20.783 DEBUG [kea-dhcp4.packets/21850] DHCP4_SUBNET_DATA
[hwtype=1 34:17:eb:f6:5e:c4], cid=[no info], tid=0x78768f6e: the selected
subnet details: 10.50.24.0/24
2019-01-17 12:59:20.783 DEBUG [kea-dhcp4.hosts/21850]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation
for subnet id 24, identified by hwaddr=3417EBF65EC4
2019-01-17 12:59:20.783 DEBUG [kea-dhcp4.hosts/21850]
HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using
identifier: hwaddr=3417EBF65EC4
2019-01-17 12:59:20.783 DEBUG [kea-dhcp4.hosts/21850]
HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=3417EBF65EC4,
found 0 host(s)
2019-01-17 12:59:20.784 DEBUG [kea-dhcp4.hosts/21850]
HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id
24 and identifier hwaddr=3417EBF65EC4
2019-01-17 12:59:20.784 DEBUG [kea-dhcp4.hosts/21850]
HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER get one host with IPv4
reservation for subnet id 24, identified by hwaddr=3417EBF65EC4
2019-01-17 12:59:20.785 DEBUG [kea-dhcp4.hosts/21850]
HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_IDENTIFIER_HOST using subnet id 24 and
identifier hwaddr=3417EBF65EC4, found host: hwaddr=3417EBF65EC4
ipv4_subnet_id=24 hostname=dell-s4000-53 ipv4_reservation=10.50.24.112
siaddr=(no) sname=(empty) file=(empty) ipv6_reservations=(none)
2019-01-17 12:59:20.785 DEBUG [kea-dhcp4.ddns/21850]
DHCP4_CLIENT_HOSTNAME_PROCESS [hwtype=1 34:17:eb:f6:5e:c4], cid=[no info],
tid=0x78768f6e: processing client's Hostname option
2019-01-17 12:59:20.785 DEBUG [kea-dhcp4.ddns/21850]
DHCP4_CLIENT_HOSTNAME_DATA [hwtype=1 34:17:eb:f6:5e:c4], cid=[no info],
tid=0x78768f6e: client sent Hostname option: cumulus
2019-01-17 12:59:20.785 DEBUG [kea-dhcp4.ddns/21850]
DHCP4_RESERVED_HOSTNAME_ASSIGNED [hwtype=1 34:17:eb:f6:5e:c4], cid=[no
info], tid=0x78768f6e: server assigned reserved hostname
dell-s4000-53.rdu.cumulusnetworks.com
2019-01-17 12:59:20.785 DEBUG [kea-dhcp4.dhcpsrv/21850]
DHCPSRV_MYSQL_GET_HWADDR obtaining IPv4 leases for hardware address
hwtype=1 34:17:eb:f6:5e:c4
2019-01-17 12:59:20.786 DEBUG [kea-dhcp4.alloc-engine/21850]
ALLOC_ENGINE_V4_DISCOVER_HR client [hwtype=1 34:17:eb:f6:5e:c4], cid=[no
info], tid=0x78768f6e sending DHCPDISCOVER has reservation for the address
10.50.24.112
2019-01-17 12:59:20.786 DEBUG [kea-dhcp4.dhcpsrv/21850]
DHCPSRV_MYSQL_GET_ADDR4 obtaining IPv4 lease for address 10.50.24.112
2019-01-17 12:59:20.786 DEBUG [kea-dhcp4.dhcpsrv/21850]
DHCPSRV_MYSQL_GET_ADDR4 obtaining IPv4 lease for address 10.50.24.112
2019-01-17 12:59:20.787 INFO  [kea-dhcp4.leases/21850] DHCP4_LEASE_ADVERT
[hwtype=1 34:17:eb:f6:5e:c4], cid=[no info], tid=0x78768f6e: lease
10.50.24.112 will be advertised
2019-01-17 12:59:20.787 DEBUG [kea-dhcp4.dhcp4/21850]
DHCP4_CLIENTID_IGNORED_FOR_LEASES [hwtype=1 34:17:eb:f6:5e:c4], cid=[no
info], tid=0x78768f6e: not using client identifier for lease allocation for
subnet 24
2019-01-17 12:59:20.787 DEBUG [kea-dhcp4.options/21850] DHCP4_PACKET_PACK
[hwtype=1 34:17:eb:f6:5e:c4], cid=[no info], tid=0x78768f6e: preparing
on-wire format of the packet to be sent
2019-01-17 12:59:20.787 ERROR [kea-dhcp4.options/21850]
DHCP4_PACKET_PACK_FAIL [hwtype=1 34:17:eb:f6:5e:c4], cid=[no info],
tid=0x78768f6e: preparing on-wire-format of the packet to be sent failed
DHCPv4 Option 239 is too big. At most 255 bytes are supported.
2019-01-17 12:59:20.787 DEBUG [kea-dhcp4.packets/21850] DHCP4_PACKET_SEND
[hwtype=1 34:17:eb:f6:5e:c4], cid=[no info], tid=0x78768f6e: trying to send
packet DHCPOFFER (type 2) from 10.50.5.11:67 to 10.50.24.1:67 on interface
eth0
2019-01-17 12:59:20.787 DEBUG [kea-dhcp4.packets/21850] DHCP4_RESPONSE_DATA
[hwtype=1 34:17:eb:f6:5e:c4], cid=[no info], tid=0x78768f6e: responding
with packet DHCPOFFER (type 2), packet details: local_address=10.50.5.11:67,
remote_address=10.50.24.1:67, msg_type=DHCPOFFER (2), transid=0x78768f6e,
options:
  type=001, len=004: 4294967040 (uint32)
  type=003, len=004: 10.50.24.1
  type=00

Re: [Kea-users] (no subject)

2018-01-12 Thread Jason Guy
Thanks Francis! This is excellent! I was going to play with this over the
weekend, now I have lots of things to play with!

Cheers and have a great weekend!
Jason

On Fri, Jan 12, 2018 at 1:12 PM, Francis Dupont  wrote:

> Jason Guy writes:
> > > => there is a documentation somewhere but I don't remember where it
> is...
> > > I am afraid it is only for one of the 2 SQL backends but it works in
> fact
> > > for both (Cassandra is another thing and this afternoon it did not
> support
> > > host reservation :-).
> >
> > I currently have mysql, but if postgres is required for this, I would
> > switch backends
> > if necessary, since I am currently planning to redeploy the services in
> the
> > network.
> > I will read the docs again and see what I can find.
>
> => I believed someone would add a pointer to the doc in the list...
> There are not enough difference between MySQL and PostgreSQL to require
> a switch. IMHO if you know only one you should keep it...
>
> Ah! Got it: http://kea.isc.org/wiki/HostReservationsHowTo
> (and it is for both! Perhaps not very up-to-date but you are not running
> the very last code too, in particulaer in production :-).
>
> > This does makes sense. I was not sure what exactly is entered in the
> column
> > for a given
> > host reservation. I assumed it was just a class name defined globally or
> > under the
> > subnet. For the other fields  (next_server, hostname, or
> boot_file_name), I
> > would
> > expect to simply enter the option data expected (ipv4 address or ascii
> > string).
>
> => yes, there is a minimal encoding between JSON and database
> representation.
> I can look at the code if you'd like...
> classes: ,,... without a space after comma
> hostname:  i.e. the string as it
> next_server:  or NULL (same than the ip-address)
> dhcp4_server_hostname and dhcp4_boot_file_name: strings
>
> You have some constraints in length so I recommend to read the schema
> (SQL is supposed to be user friendly and you have "shells" to play with).
>
> Regards
>
> Francis Dupont 
>
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] (no subject)

2018-01-12 Thread Francis Dupont
Jason Guy writes:
> > => there is a documentation somewhere but I don't remember where it is...
> > I am afraid it is only for one of the 2 SQL backends but it works in fact
> > for both (Cassandra is another thing and this afternoon it did not support
> > host reservation :-).
> 
> I currently have mysql, but if postgres is required for this, I would
> switch backends
> if necessary, since I am currently planning to redeploy the services in the
> network.
> I will read the docs again and see what I can find.

=> I believed someone would add a pointer to the doc in the list...
There are not enough difference between MySQL and PostgreSQL to require
a switch. IMHO if you know only one you should keep it...

Ah! Got it: http://kea.isc.org/wiki/HostReservationsHowTo
(and it is for both! Perhaps not very up-to-date but you are not running
the very last code too, in particulaer in production :-).

> This does makes sense. I was not sure what exactly is entered in the column
> for a given
> host reservation. I assumed it was just a class name defined globally or
> under the
> subnet. For the other fields  (next_server, hostname, or boot_file_name), I
> would
> expect to simply enter the option data expected (ipv4 address or ascii
> string).

=> yes, there is a minimal encoding between JSON and database representation.
I can look at the code if you'd like...
classes: ,,... without a space after comma
hostname:  i.e. the string as it
next_server:  or NULL (same than the ip-address)
dhcp4_server_hostname and dhcp4_boot_file_name: strings

You have some constraints in length so I recommend to read the schema
(SQL is supposed to be user friendly and you have "shells" to play with).

Regards

Francis Dupont 
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] (no subject)

2018-01-12 Thread Jason Guy
Hi Francis,

On Thu, Jan 11, 2018 at 6:15 PM, Francis Dupont  wrote:

> Jason Guy writes:
> > I do not see any documentation for specifying parameters this way, or
> what
> > specifically needs to be entered into the row to utilize this. Any
> > information or pointers on how to do this would be helpful.
>
> => there is a documentation somewhere but I don't remember where it is...
> I am afraid it is only for one of the 2 SQL backends but it works in fact
> for both (Cassandra is another thing and this afternoon it did not support
> host reservation :-).
>

I currently have mysql, but if postgres is required for this, I would
switch backends
if necessary, since I am currently planning to redeploy the services in the
network.
I will read the docs again and see what I can find.


> > I don't want to
> > define my host reservations in the configuration file, but I understand
> if
> > I have to define the client class before referencing it in the database.
>
> => at the exception of built-in classes when a class is not defined
> it does nothing and it raises a warning when option values are
> computed (the idea is to help when the class name was mistyped).
> So it is not a formal requirement to define classes but it does not
> make sense to not define them...
>

This does makes sense. I was not sure what exactly is entered in the column
for a given
host reservation. I assumed it was just a class name defined globally or
under the
subnet. For the other fields  (next_server, hostname, or boot_file_name), I
would
expect to simply enter the option data expected (ipv4 address or ascii
string).

Thanks!
Jason
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users


Re: [Kea-users] (no subject)

2018-01-11 Thread Francis Dupont
Jason Guy writes:
> I do not see any documentation for specifying parameters this way, or what
> specifically needs to be entered into the row to utilize this. Any
> information or pointers on how to do this would be helpful.

=> there is a documentation somewhere but I don't remember where it is...
I am afraid it is only for one of the 2 SQL backends but it works in fact
for both (Cassandra is another thing and this afternoon it did not support
host reservation :-).

> I don't want to
> define my host reservations in the configuration file, but I understand if
> I have to define the client class before referencing it in the database.

=> at the exception of built-in classes when a class is not defined
it does nothing and it raises a warning when option values are
computed (the idea is to help when the class name was mistyped).
So it is not a formal requirement to define classes but it does not
make sense to not define them...

Thanks

Francis Dupont 
___
Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users