When networkd starts or restarts, links are enumerated in ifindex order. A slave enumerated before its master cannot register itself in link_append_to_master(), as the master Link object does not exist yet. The master then wrongly believes it has no slaves until the next RTM_NEWLINK message for the slave arrives. The stale slaves set affects operational state propagation (degraded-carrier detection) and any code that inspects the slaves of a master. For instance, on restart, when networkd thinks that the master has no slaves yet, we try to set the bond fail-over policy, which the kernel then refuses because in reality the bond does have slaves. To fix the issue, this updates the list of slaves after enumeration. Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
10 lines
145 B
SYSTEMD
10 lines
145 B
SYSTEMD
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
[NetDev]
|
|
Name=bond99
|
|
Kind=bond
|
|
|
|
[Bond]
|
|
Mode=active-backup
|
|
FailOverMACPolicy=active
|
|
MIIMonitorSec=1s
|