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

Support for RHEL 4.18 kernels #1175

Merged
merged 7 commits into from
Sep 18, 2024
Merged

Support for RHEL 4.18 kernels #1175

merged 7 commits into from
Sep 18, 2024

Conversation

rafaelroquetto
Copy link
Contributor

@rafaelroquetto rafaelroquetto commented Sep 17, 2024

Relax the minimum supported version and tweak a few tests to allow Beyla to run on RHEL 4.8 kernel series.

From the package description:

"This is the package which provides the Linux kernel for Red Hat Enterprise
Linux. It is based on upstream Linux at version 4.18.0 and maintains kABI
compatibility of a set of approved symbols, however it is heavily modified with
backports and fixes pulled from newer upstream Linux kernel releases. This means
this is not a 4.18.0 kernel anymore: it includes several components which come
from newer upstream linux versions, while maintaining a well tested and stable
core. Some of the components/backports that may be pulled in are: changes like
updates to the core kernel (eg.: scheduler, cgroups, memory management, security
fixes and features), updates to block layer, supported filesystems, major driver
updates for supported hardware in Red Hat Enterprise Linux, enhancements for
enterprise customers, etc."

(source)

These are the kernels whose version is analogous to 4.18.0-xxx.el8 and they feature the functionality required by Beyla, included but not limited to:

  • BTF support
  • BPF ring buffers

Early RHEL 4.18 kernels (such as 4.18.0-240.el8) do not yet feature BPF ring buffers and are not supported.
These kernels do not support BEYLA_BPF_TRACK_REQUEST_HEADERS=1.

Tested on:

  • CentOS 8 (4.18.0-348.7.1.el8_5.x86_64)
  • AlmaLinux 8 (4.18.0-553.16.1.el8_10.x86_64)

Resolves #1146

@rafaelroquetto rafaelroquetto added do-not-merge WIP or something that musn't be merged wip labels Sep 17, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 81.13%. Comparing base (5c8c8c2) to head (6af03dd).
Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
pkg/internal/ebpf/instrumenter.go 0.00% 3 Missing ⚠️
pkg/beyla/os.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1175      +/-   ##
==========================================
- Coverage   81.16%   81.13%   -0.03%     
==========================================
  Files         136      136              
  Lines       11447    11451       +4     
==========================================
  Hits         9291     9291              
- Misses       1630     1634       +4     
  Partials      526      526              
Flag Coverage Δ
integration-test 56.94% <16.66%> (-0.02%) ⬇️
k8s-integration-test 58.83% <16.66%> (-0.01%) ⬇️
oats-test 35.79% <16.66%> (-0.02%) ⬇️
unittests 53.51% <0.00%> (-0.05%) ⬇️

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.

@rafaelroquetto rafaelroquetto changed the title WIP: Kernel 418 support WIP: Support for select 4.18 kernels Sep 17, 2024
@rafaelroquetto rafaelroquetto changed the title WIP: Support for select 4.18 kernels WIP: Support for RHEL 4.18 kernels Sep 18, 2024
@rafaelroquetto rafaelroquetto changed the title WIP: Support for RHEL 4.18 kernels Support for RHEL 4.18 kernels Sep 18, 2024
@rafaelroquetto rafaelroquetto added documentation Improvements or additions to documentation and removed do-not-merge WIP or something that musn't be merged wip labels Sep 18, 2024
@rafaelroquetto rafaelroquetto marked this pull request as ready for review September 18, 2024 02:34
Copy link
Contributor

@mariomac mariomac left a comment

Choose a reason for hiding this comment

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

Amazing job!

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@marctc marctc left a comment

Choose a reason for hiding this comment

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

Amazing, few lines you fixed this!

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! Great stuff @rafaelroquetto!

README.md Outdated Show resolved Hide resolved
@rafaelroquetto rafaelroquetto force-pushed the kernel418 branch 5 times, most recently from a96dcc5 to 8b31176 Compare September 18, 2024 20:07
@rafaelroquetto rafaelroquetto merged commit 5aace7e into main Sep 18, 2024
10 checks passed
@rafaelroquetto rafaelroquetto deleted the kernel418 branch September 18, 2024 21:43
@adelbot
Copy link

adelbot commented Sep 24, 2024

I test the Version=v1.8.4 Revision=98352a7 on a new RH8.
with kernel : 4.18.0-553.8.1.el8_10.x86_64

and i have always the message about version of kernel :
time=2024-09-24T16:04:10.266+02:00 level=ERROR msg="can't start Beyla" error="kernel version 4.18 not supported. Minimum required version is 5.8"

i use a wrong version ?

@rafaelroquetto
Copy link
Contributor Author

Hey @adelbot ! This PR introducing support for select 4.8 kernels hasn't yet been released. In order to test it, you will need to build Beyla's main branch from scratch, or wait for when Beyla 1.9 is released (not before Obscon).

mattdurham pushed a commit to mattdurham/beyla that referenced this pull request Jan 22, 2025
* Change minimum supported version to 4.18

* Expose KernelVersion()

* Instrumenter: do not error on optional kprobes

* Mark sys_clone3 as optional

This syscall is not present in older kernels

* Disable kprobe trace propgation tests on older kernels

* Update docs

* Update README.md

Co-authored-by: Sean Packham <sean.packham@grafana.com>

---------

Co-authored-by: Sean Packham <sean.packham@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.18 kernel support
7 participants