You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2428889
Browse filesBrowse the repository at this point in the historyBrowse files
[core] Implement neighbor validation through LLDP data
The interface controller retrieves LLDP adjacency information from the
provider and populates the Interface status. The ExpirationTime is
computed once from TTL and preserved across reconciliations to avoid
continuous status updates caused by clock drift between the device and
operator.
Neighbor validation is a non-blocking operation during reconciliation -
errors are logged but don't prevent device configuration. Validation
checks the label first (against another Interface k8s resource), then
falls back to the annotation (user-defined string in format
"<deviceID>::<portID>").
// updateNeighborAdjacenciesStatus updates the Interface status with the LLDP neighbor adjacencies returned by the provider.
535
+
// It validates the adjacencies by looking for at the corresponding label/annotation.
536
+
// It first attempts to validate through label (neighbor is managed by the operator and exists as a kubernetes resource).
537
+
// If that fails, it attempts to validate through annotation (neighbor is not managed by the operator).
538
+
// Only returns an error if there is an issue during the validation process, but does not return an error if the validation fails (i.e. the adjacency is marked as invalid).
// The TTL reported by the device and the operator clock can drift one from each other for more than one second.
571
+
// If we use the TTL to compute ExpirationTime on each reconciliation, then ExpirationTime will keep changing, triggering unnecessary updates to the Interface status.
572
+
// Thus, we preserve the existing ExpirationTime as long as the neighbor is still valid, at the cost of some inaccuracy.
0 commit comments