|
Ran
|
Jobs
1
|
Files
36
|
Run time
1min
|
Badge
README BADGES
|
push
github
CA-432654: Make networkd start lldpd quickly and reliably (#7354) When Dom0's host name doesn't resolve, lldpd crashes after systemd starts it on dom0. This is fixed by https://github.com/lldpd/lldpd/commit/a2f4b2c92. However it exposes the fragility that xcp-networkd could take more than 45 s to start. systemd then killed it, and networkd sometimes dumped core on the way down. There are three causes: - Config replay race. lldpd reports it is ready before it replays /etc/lldpd.d. Settings in that file could overwrite what networkd had just set, so networkd had to wait for the replay to finish. With a large amount of NICs and lldpd crash, the time is wasted here. - Slow lookups. Until the system name is set, lldpd looks up the host name on every update, and every lldpcli config command triggers an update. With a name that doesn't resolve, each lookup takes about 0.5 s. networkd sent the system name late, after several other commands, and it also waited for lldpd's own config replay to finish. Startup slowed down with every NIC. - Shutdown deadlock. The SIGTERM handler can run on the startup thread while that thread holds the LLDP scope lock. Lldp.stop then took the same lock, failed with "Resource deadlock avoided", and never reached exit. systemd aborted networkd and it dumped core. Changes - Start lldpd with a deny-all interface pattern. - lldpd is started with -I !* through a runtime systemd drop-in (/run/systemd/system/lldpd.service.d/10-networkd.conf), so it manages no interface until networkd sets the scope. - The default config file now holds only the settings networkd doesn't manage, so lldpd's replay and networkd no longer overlap. The wait for the replay is removed. - A port is added to the scope only after its settings are applied, because a port in the scope starts sending at once. - Set the system name first. - Right after starting lldpd, networkd sets the system name before any other config, so the slow h... (continued)
3667 of 4642 relevant lines covered (79.0%)
0.79 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | python3.11 - 41804245234.1 | 36 |
79.0
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|