calico: Failed to apply policy to endpoint, leaving it dirty; ingress does not equal egress

Current Behavior

After upgrading from 3.28.1 to 3.29.1, we run into the following errors on calico-node during the daemonset rollout.

Example:

2025-04-03 21:34:06.169 [WARNING][70] felix/bpf_ep_mgr.go 2063: Failed to apply policy to endpoint, leaving it dirty error=ingress qdisc info ({true 49152 2}) does not equal egress qdisc info ({true 49152 1}) name="cali2c836746763" wepID=orchestrator_id:"k8s" workload_id:"integrations-rabbitmq/int-eco-rabbit-server-0" endpoint_id:"eth0" 

This error shows up for a lot of pods (but not all?) on that daemonset node. Only workaround we have found is to delete the pod with that endpoint. Then after deleting all of them, the calico-node reports ready after the BPFEndpointManager has become ready.

From what we can tell, this happens when the daamonset has a rollout.

Possible Solution

Steps to Reproduce (for bugs)

  1. Kubespray cluster with calico v3.28.1
  2. Perform upgrade to v3.29.1
  3. Daemonset rollout will not finish.

Context

It halts the rollout of calico-nodes, and pod endpoints are unavailable when it happens.

Your Environment

  • Calico version 3.29.1
  • Calico dataplane (iptables, windows etc.) ebpf
  • Orchestrator version (e.g. kubernetes, mesos, rkt): kubernetes v1.29.5
  • Operating System and version:
  • Link to your project (optional):

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 31 (12 by maintainers)

Most upvoted comments

Guys, migration is complete!

$ kubectl get tigerastatuses.operator.tigera.io calico
NAME     AVAILABLE   PROGRESSING   DEGRADED   SINCE
calico   True        False         False      6m1s

Didn’t run into any more dirty ingress/egress issues, and seems like the MetaData updates have calmed down as well.

I want to thank you for your very swift help with this! Really impressive!

Cheers!

@mgvazquez This is already present in the latest release v3.30.

@devops-matriz @moss-telavox Will you be able to test this calico-node image, sridhartigera/node:bpf-hostip-fix and see if the issue is persists. This image is based out of 3.29.

Thanks a lot @sridhartigera! Will give it a try as soon as possible (have to find a good window).

Will let you know!