Skip to content
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

new(userspace/libsinsp): support multiple CRI engines simultaneously #2141

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

leogr
Copy link
Member

@leogr leogr commented Oct 31, 2024

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes falcosecurity/falco#3279

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

update(userspace/libsinsp): sinsp_container_manager can now handle multiple CRI engines simultaneously

Copy link

github-actions bot commented Oct 31, 2024

Perf diff from master - unit tests

     5.69%     -1.70%  [.] gzfile_read
    10.00%     +1.07%  [.] sinsp_parser::reset
     3.83%     -0.89%  [.] sinsp_thread_manager::get_thread_ref
     6.45%     -0.79%  [.] next_event_from_file
     2.58%     -0.60%  [.] next
     2.67%     +0.53%  [.] sinsp_thread_manager::find_thread
     0.52%     +0.51%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>
     1.80%     +0.49%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node
     7.10%     +0.48%  [.] sinsp_evt::get_type
     0.79%     +0.45%  [.] std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>

Heap diff from master - unit tests

peak heap memory consumption: -520B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: -520B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            +0.0328         +0.0328           145           150           145           150
BM_sinsp_split_median                                          +0.0344         +0.0345           145           150           145           150
BM_sinsp_split_stddev                                          +0.1831         +0.1820             1             2             1             2
BM_sinsp_split_cv                                              +0.1455         +0.1445             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0159         +0.0159            61            62            61            62
BM_sinsp_concatenate_paths_relative_path_median                +0.0158         +0.0158            61            62            61            62
BM_sinsp_concatenate_paths_relative_path_stddev                -0.3785         -0.3788             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.3882         -0.3885             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0324         -0.0324            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_median                   -0.0318         -0.0318            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_stddev                   -0.0333         -0.0332             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       -0.0010         -0.0009             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0017         +0.0017            63            63            63            63
BM_sinsp_concatenate_paths_absolute_path_median                -0.0117         -0.0117            63            63            63            63
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.5360         -0.5362             1             1             1             1
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.5368         -0.5370             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0026         +0.0026           390           391           390           391
BM_sinsp_split_container_image_median                          -0.0026         -0.0026           392           391           392           391
BM_sinsp_split_container_image_stddev                          -0.5076         -0.5075             7             3             7             3
BM_sinsp_split_container_image_cv                              -0.5089         -0.5088             0             0             0             0

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 91.17647% with 3 lines in your changes missing coverage. Please review.

Project coverage is 75.20%. Comparing base (0fd43cb) to head (fded35b).
Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
userspace/libsinsp/container.cpp 86.95% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2141   +/-   ##
=======================================
  Coverage   75.19%   75.20%           
=======================================
  Files         259      259           
  Lines       33878    33873    -5     
  Branches     5800     5799    -1     
=======================================
- Hits        25476    25473    -3     
+ Misses       8402     8400    -2     
Flag Coverage Δ
libsinsp 75.20% <91.17%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leogr
Copy link
Member Author

leogr commented Nov 5, 2024

/milestone 0.19

@poiana
Copy link
Contributor

poiana commented Nov 5, 2024

@leogr: The provided milestone is not valid for this repository. Milestones in this repository: [0.19.0, 0.20.0, TBD, next-driver]

Use /milestone clear to clear the milestone.

In response to this:

/milestone 0.19

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@leogr
Copy link
Member Author

leogr commented Nov 5, 2024

/milestone 0.19.0

@poiana poiana added this to the 0.19.0 milestone Nov 5, 2024
@leogr leogr force-pushed the update/support-multiple-container-engine branch from 0516fe3 to ad18a68 Compare November 5, 2024 16:52
@FedeDP
Copy link
Contributor

FedeDP commented Nov 18, 2024

Moving to next milestone,
/milestone 0.20.0

@leogr leogr force-pushed the update/support-multiple-container-engine branch from ad18a68 to fded35b Compare December 11, 2024 10:01
@leogr leogr changed the title wip: support multiple CRI engines simultaneously support multiple CRI engines simultaneously Dec 11, 2024
@FedeDP FedeDP changed the title support multiple CRI engines simultaneously new(userspace/libsinsp): support multiple CRI engines simultaneously Dec 13, 2024
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Dec 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, leogr

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 4eb67f0 into master Dec 20, 2024
48 of 49 checks passed
@poiana poiana deleted the update/support-multiple-container-engine branch December 20, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple container runtime in one node
4 participants