otterize / network-mapper

Map Kubernetes traffic: in-cluster, to the Internet, and to AWS IAM and export as text, intents, or an image
Apache License 2.0
612 stars 23 forks source link

[Bugfix] ProcFSIPResolver: Retry handling new processes if mapping extraction fails #122

Closed roekatz closed 1 year ago

roekatz commented 1 year ago

This solves an issue of the resolver not holding a mapping (ip:hostname) of a long lived process, just because on the first try (after process creation) we got "Permission Denied" on /proc/$pid/environ. Turns out on process creation - there is some time where the process' dir already exists under /proc but not all files there are accessible yet.

The fix is to keep reporting the process as new (on the next intervals) as long as its handling wasn't successful (up to 3 retries).

This bug made the CI e2e tests flaky.