microsoft/retina

Stale ebpf maps if agent stops abruptly

Open

#537 opened on Jul 10, 2024

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Go (293 forks)auto 404
area/ebpfarea/pluginshelp wantedlang/gopriority/0

Repository metrics

Stars
 (3,161 stars)
PR merge metrics
 (PR metrics pending)

Description

Describe the bug

If agent pod is OOMKIlled, Packetparser leaves behind stale maps and qdiscs. These are never cleaned up on restart.

To Reproduce Steps to reproduce the behavior:

  1. Deploy retina-advanced
  2. Exec into a node and kill the controller process repeatedly
  3. Check maps and qdiscs

Expected behavior Only one instance of maps should exist for each plugin and one ingress/egress qdisc for each veth.

Platform (please complete the following information):

  • OS: Linux
  • Kubernetes Version: 1.29
  • Host: AKS
  • Retina Version: current

Additional context Suggestion - Cleanup should happen in init container (probably we need privilege to clean up residual maps and qdiscs)

Contributor guide