Possible race in DEP8 test
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-kea (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
isc-kea has a new DEP8 test that brings up the DHCP server on a bridge, and a DHCP client on an interface connected to that bridge.
Every now and then, this test fails due to the client not obtaining an IP address, even after 60s.
Here is such a failure:
https:/
According to these logs, it looks like the `keabr0` bridge took 3s to become ready, but by then the kea dhcp4 server already had given up:
From dmesg:
```
[Tue Feb 28 17:43:46 2023] keabr0: port 1(p1) entered blocking state
[Tue Feb 28 17:43:46 2023] keabr0: port 1(p1) entered disabled state
[Tue Feb 28 17:43:46 2023] device p1 entered promiscuous mode
[Tue Feb 28 17:43:49 2023] IPv6: ADDRCONF(
[Tue Feb 28 17:43:49 2023] IPv6: ADDRCONF(
[Tue Feb 28 17:43:49 2023] keabr0: port 1(p1) entered blocking state
[Tue Feb 28 17:43:49 2023] keabr0: port 1(p1) entered forwarding state
[Tue Feb 28 17:43:49 2023] IPv6: ADDRCONF(
```
And kea's dhcp4 server logs:
Feb 28 17:43:46 autopkgtest kea-dhcp4[1242]: 2023-02-28 17:43:46.838 WARN [kea-dhcp4.
Feb 28 17:43:46 autopkgtest kea-dhcp4[1242]: 2023-02-28 17:43:46.838 INFO [kea-dhcp4.
Feb 28 17:43:46 autopkgtest kea-dhcp4[1242]: 2023-02-28 17:43:46.838 WARN [kea-dhcp4.
Feb 28 17:43:46 autopkgtest kea-dhcp4[1242]: 2023-02-28 17:43:46.839 WARN [kea-dhcp4.
Feb 28 17:43:46 autopkgtest kea-dhcp4[1242]: 2023-02-28 17:43:46.839 INFO [kea-dhcp4.
We either need to loop over the status of `keabr0` and only restart kea-dhcp4 when the bridge is ready, or maybe there is a config option for kea-dhcp4 to retry a few more times, as there is a hint that such a mechanism exists, given the "attempts: 0" text from the log.
Changed in isc-kea (Ubuntu): | |
status: | New → In Progress |
Yep, there is such an option[1] in kea-dhcp4:
``` sockets- max-retries and service- sockets- retry-wait- time.
Sometimes, immediate interruption isn't a good choice. The port can be unavailable only temporary. In this case, retrying the opening may resolve the problem. Kea provides two options to specify the retrying: service-
The first defines a maximal number of retries that Kea makes to open a socket. The zero value (default) means that the Kea doesn't retry the process.
The second defines a wait time (in milliseconds) between attempts. The default value is 5000 (5 seconds).
```
1. https:/ /kea.readthedoc s.io/en/ latest/ arm/dhcp4- srv.html? highlight= attempt# interface- configuration