-
Notifications
You must be signed in to change notification settings - Fork 175
cleanup(userspace/libsinsp,test,build): drop container manager #2207
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
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP 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 |
cc @falcosecurity/libs-maintainers |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
b28ea4c
to
dbfc736
Compare
/milestone 0.21.0 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2207 +/- ##
==========================================
+ Coverage 75.32% 77.01% +1.68%
==========================================
Files 280 220 -60
Lines 34556 30126 -4430
Branches 5902 4614 -1288
==========================================
- Hits 26031 23203 -2828
+ Misses 8525 6923 -1602
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
6fa963b
to
079cef8
Compare
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…n threadinfo. It leverages sinsp state table API to retrieve "container_id" field written by the plugin. Use it where needed. Moreover, user_group_manager cannot subscribe to container changes anymore, since container changes are no more in sinsp. Instead, parse ASYNC event "container_removed" to cleanup user_group tables. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…gin. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…re unused. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Nowadays, it was only filtering out gvisor (and thus protobuf), but we already have the `BUILD_LIBSCAP_GVISOR` flag for that. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…sts. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…xposed table. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
a92a0c6
to
7a2bc04
Compare
Force-pushed the requested changes @leogr ! |
/unhold |
Missed from falcosecurity#2207, the comment makes no sense now. Drop it. Signed-off-by: Angelo Puglisi <angelopuglisi86@gmail.com>
Missed from #2207, the comment makes no sense now. Drop it. Signed-off-by: Angelo Puglisi <angelopuglisi86@gmail.com>
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area build
/area CI
/area libsinsp
/area tests
What this PR does / why we need it:
Following falcosecurity/falco#3403, this PR does multiple things:
BUILD_LIBSCAP_GVISOR
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Opening this just to let other people know about the cleanup; also, this will be wip until all TODOs below are done.
TODO:
sinsp_network_interfaces::is_ipv4addr_in_local_machine()
: https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/ifinfo.cpp#L326sinsp_filter_check_user::extract_single
: https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/sinsp_filtercheck_user.cpp#L93m_program_hash
andm_program_hash_scripts
as foreign key filled in by the container plugin and dropcompute_program_hash
. OR, use a RAII object just like we did for users/groups (chore(userspace/libsinsp): move user group manager on container_id changed refresh to a RAII object #2194) -> after a discussion with @jasondellaluce we decided to go the cleanup(userspace/libsinsp): call sinsp_observer methods after an event has been processed by all parsers #2222 route: since sinsp (and Falco) are not using those fields, we offload their implementation to the libs consumers, if needed.container.id=null
lines in the sinsp output -> found out it was due to thecontainer_removed
event being processed WHILE we were still dequeuing from the ring buffer syscall events coming from the container :O fix(userspace/libsinsp): do not immediately process async events whose timestamp is in the future in case a SCAP_TIMEOUT is received #2250Less important:
container
plugin to plugins repo plugins#636Does this PR introduce a user-facing change?: