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

fix(userspace/libsinsp): disable HTTP proxy for CRI connection #2113

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

wigol
Copy link
Contributor

@wigol wigol commented Oct 15, 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:
This change explicitly configures GRPC channel used for CRI socket communication to skip HTTP proxy configuration.
Since the CRI path already hardcodes unix://, the proxy will not be used anyway, but by disabling it we are silencing the unnecessary error message.
See https://github.com/grpc/grpc/blob/2de2e8dd8921e1f7d043e01faf7fe8a291fbb072/src/core/ext/filters/client_channel/http_proxy.cc#L111 and https://github.com/grpc/grpc/blob/2de2e8dd8921e1f7d043e01faf7fe8a291fbb072/src/core/ext/filters/client_channel/http_proxy.cc#L122-L125 .

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Copy link

github-actions bot commented Oct 15, 2024

Perf diff from master - unit tests

     5.35%     -1.67%  [.] next
     0.88%     +0.87%  [.] libsinsp::sinsp_suppress::process_event
    10.32%     -0.86%  [.] sinsp_parser::reset
     4.35%     -0.84%  [.] sinsp_evt::load_params
     0.49%     +0.62%  [.] sinsp_split[abi:cxx11]
     1.48%     -0.60%  [.] sinsp_parser::parse_context_switch
     2.76%     +0.59%  [.] sinsp_thread_manager::get_thread_ref
     1.98%     +0.52%  [.] scap_event_decode_params
     1.32%     -0.45%  [.] sinsp_parser::event_cleanup
     1.41%     -0.43%  [.] sinsp_threadinfo::~sinsp_threadinfo

Heap diff from master - unit tests

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

Heap diff from master - scap file

peak heap memory consumption: 0B
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.0159         -0.0159           154           152           154           152
BM_sinsp_split_median                                          -0.0173         -0.0174           154           152           154           152
BM_sinsp_split_stddev                                          -0.2661         -0.2666             2             1             2             1
BM_sinsp_split_cv                                              -0.2542         -0.2547             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0121         +0.0121            60            61            60            61
BM_sinsp_concatenate_paths_relative_path_median                +0.0114         +0.0114            60            61            60            61
BM_sinsp_concatenate_paths_relative_path_stddev                +0.7079         +0.7087             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    +0.6875         +0.6884             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     -0.0235         -0.0235            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_median                   -0.0286         -0.0286            25            24            25            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +3.9941         +4.0008             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +4.1141         +4.1210             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0056         +0.0056            63            63            63            63
BM_sinsp_concatenate_paths_absolute_path_median                +0.0048         +0.0048            62            63            62            63
BM_sinsp_concatenate_paths_absolute_path_stddev                +0.9916         +0.9908             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_cv                    +0.9806         +0.9798             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0193         +0.0193           391           398           391           398
BM_sinsp_split_container_image_median                          +0.0195         +0.0195           391           398           391           398
BM_sinsp_split_container_image_stddev                          +0.2563         +0.2558             2             2             2             2
BM_sinsp_split_container_image_cv                              +0.2325         +0.2319             0             0             0             0

@wigol wigol force-pushed the wigol/disable-http-proxy-for-cri branch from bc92c52 to 0f6c997 Compare October 15, 2024 14:08
Copy link
Member

@Andreagit97 Andreagit97 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 Oct 15, 2024

LGTM label has been added.

Git tree hash: 4c895fcb8306238c373d3bebb1b9def1c1ce3151

@Andreagit97 Andreagit97 added this to the 0.19.0 milestone Oct 15, 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 Oct 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, wigol

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

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.69%. Comparing base (c49225d) to head (0f6c997).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2113   +/-   ##
=======================================
  Coverage   73.69%   73.69%           
=======================================
  Files         253      253           
  Lines       31914    31916    +2     
  Branches     5613     5631   +18     
=======================================
+ Hits        23519    23521    +2     
- Misses       8371     8375    +4     
+ Partials       24       20    -4     
Flag Coverage Δ
libsinsp 73.69% <100.00%> (+<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.

@poiana poiana merged commit c082ec3 into falcosecurity:master Oct 15, 2024
47 of 49 checks passed
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.

4 participants