better transient state handling
This commit is contained in:
@@ -268,8 +268,11 @@ class BridgeLinkStateWatcher:
|
||||
for ifname in states
|
||||
if self._config_changed(ifname, states, previous_states)
|
||||
)
|
||||
if changed_members:
|
||||
self._mark_config_changes(changed_members, now)
|
||||
transition_seeds: list[str] = list(changed_members)
|
||||
if reason == "netlink_event" and source_ifname is not None and source_ifname in states:
|
||||
transition_seeds.append(source_ifname)
|
||||
if transition_seeds:
|
||||
self._mark_config_changes(transition_seeds, now)
|
||||
|
||||
if failing_members:
|
||||
config_source = self._find_config_sync_source(states, previous_states, preferred_ifname=source_ifname)
|
||||
@@ -476,8 +479,9 @@ class BridgeLinkStateWatcher:
|
||||
def _mark_config_changes(self, ifnames: list[str], now: float) -> None:
|
||||
"""Keep short-lived link flaps from config changes from being treated as failures."""
|
||||
holdoff = max(
|
||||
settings.bridge_link_state_failure_holdoff_seconds,
|
||||
self.recovery_holdoff_seconds,
|
||||
settings.bridge_link_state_failure_holdoff_seconds * 2,
|
||||
self.recovery_holdoff_seconds * 2,
|
||||
1.5,
|
||||
)
|
||||
with self._lock:
|
||||
for ifname in ifnames:
|
||||
|
||||
Reference in New Issue
Block a user