-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Issue
Users have had problems with the dappnode wifi for a long time, and seems like one of the root causes is the following issue:
When the wifi container starts, it takes the network interface from the host (commonly wlan0) as well as the physical layer, (commonly the phy0) these are the paths that simply disappear:
/sys/class/net/wlan0/sys/class/ieee80211/phy0
When the wifi container gets stopped, the network interface and the physical layer should appear back in the host, but it seems like there is a delay of 1' 53'' average, to appear in the host back again.
The line of code that takes the network interface from the host is:
Line 84 in 348eb25
| docker run -t --privileged --net=host --pid=host --rm --entrypoint /bin/sh ${CONTAINER_IMAGE} -c " |
Debugging
This report was obtained using a script for debugging purposes, which:
- Stops wifi container and waits for the paths to exists
- Starts wifi container and start again
Timelapses obtained:
Time lapse: Thu Jul 8 16:27:50 CEST 2021 - Thu Jul 8 16:27:50 CEST 2021Time lapse: Thu Jul 8 16:27:59 CEST 2021 - Thu Jul 8 16:29:52 CEST 2021Time lapse: Thu Jul 8 16:30:01 CEST 2021 - Thu Jul 8 16:31:55 CEST 2021Time lapse: Thu Jul 8 16:32:04 CEST 2021 - Thu Jul 8 16:33:58 CEST 2021Time lapse: Thu Jul 8 16:34:07 CEST 2021 - Thu Jul 8 16:36:00 CEST 2021
=============================================================Time lapse: Thu Jul 8 18:17:55 CEST 2021 - Thu Jul 8 18:17:55 CEST 2021Time lapse: Thu Jul 8 18:18:05 CEST 2021 - Thu Jul 8 18:18:05 CEST 2021Time lapse: Thu Jul 8 18:18:15 CEST 2021 - Thu Jul 8 18:20:07 CEST 2021Time lapse: Thu Jul 8 18:20:17 CEST 2021 - Thu Jul 8 18:22:09 CEST 2021Time lapse: Thu Jul 8 18:22:19 CEST 2021 - Thu Jul 8 18:24:11 CEST 2021
Note: notice that the first attempt works without issues, the rest of them has an average delay of 1' 50-58''
Possible solutions
- The ideal solution would be to execute a
systemctl restart networkand make interfaces appear back again in the host. The concern is that this procedure is a bit aggressive and I did not got it work