-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
close all maps when agent is terminating #196
Conversation
Signed-off-by: msherif1234 <mmahmoud@redhat.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #196 +/- ##
==========================================
- Coverage 31.84% 31.75% -0.10%
==========================================
Files 37 37
Lines 3278 3288 +10
==========================================
Hits 1044 1044
- Misses 2175 2185 +10
Partials 59 59
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
if err := m.objects.FlowSequences.Close(); err != nil { | ||
errs = append(errs, err) | ||
} | ||
if len(errs) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to keep the objects reference if there are errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case we wanted to retry but we are in SIGTERM handler at this point so not sure how much time we have, I feel this is the source of stale entries
as per the doc as it sounded like best effort and not guaranteed https://github.com/cilium/ebpf/blob/d2b69beb8d3b8648c0017e661a7385ae2107a5be/map.go#L1108
code lgtm /lgtm |
No bug for it I saw it while doing some tests and while checking the code notice a couple of maps not freed up when the prog is closed |
LGTM too, merging this as it's no qe task |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
we can have stale map when the agent pod has been terminated
Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.