diff --git a/felix/dataplane/linux/bpf_ep_mgr.go b/felix/dataplane/linux/bpf_ep_mgr.go index f346cf05724..734b5a4b3ab 100644 --- a/felix/dataplane/linux/bpf_ep_mgr.go +++ b/felix/dataplane/linux/bpf_ep_mgr.go @@ -54,6 +54,7 @@ import ( "github.com/projectcalico/calico/felix/logutils" "github.com/projectcalico/calico/felix/rules" + logutilslc "github.com/projectcalico/calico/libcalico-go/lib/logutils" "github.com/projectcalico/calico/libcalico-go/lib/set" "github.com/projectcalico/api/pkg/lib/numorstring" @@ -358,7 +359,8 @@ type bpfEndpointManager struct { v4 *bpfEndpointManagerDataplane v6 *bpfEndpointManagerDataplane - healthAggregator *health.HealthAggregator + healthAggregator *health.HealthAggregator + updateRateLimitedLog *logutilslc.RateLimitedLogger } type bpfEndpointManagerDataplane struct { @@ -506,6 +508,11 @@ func newBPFEndpointManager( }) } + m.updateRateLimitedLog = logutilslc.NewRateLimitedLogger( + logutilslc.OptInterval(30*time.Second), + logutilslc.OptBurst(10), + ) + // Calculate allowed XDP attachment modes. Note, in BPF mode untracked ingress policy is // _only_ implemented by XDP, so we _should_ fall back to XDPGeneric if necessary in order // to preserve the semantics of untracked ingress policy. (Therefore we are also saying @@ -1560,6 +1567,10 @@ func (m *bpfEndpointManager) CompleteDeferredWork() error { } m.reportHealth(true, "") } else { + m.dirtyIfaceNames.Iter(func(iface string) error { + m.updateRateLimitedLog.WithField("name", iface).Debug("Interface remains dirty.") + return nil + }) m.reportHealth(false, "Failed to configure some interfaces.") }