-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Only start Journald input with supported systemd versions #39605
base: main
Are you sure you want to change the base?
Only start Journald input with supported systemd versions #39605
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
This pull request is now in conflicts. Could you fix it? 🙏
|
7a1460c
to
32d12e3
Compare
I converted this PR to draft because we still need to decide how if we want to move forward with D-Bus and the best way to test it. |
The Systemd D-Bus documentation clearly states the version property should not be parsed because its scheme may change and it is not part of the API.
However, it seems to be stable enough among the versions I manually tested:
So I believe it is safe to move forward using it. It does add the D-Bus dependency to the Journald input, which I believe is not a problem to run the input, but we will need to make some changes in CI to run the tests. |
This commit adds a flag to ignore the Systemd version check for the Journald input. The mage targets are updated so the Journald input unit tests always run. The tests disable the Systemd version check so we can run the tests in our current hosts.
c959999
to
d5e4f5d
Compare
Proposed commit message
Systemd/Journald has a bug that will cause Filebeat to be killed by a SIGBUS when reading from rotated logs. This bug is fixed in Systemd v255.
This commit checks the Systemd version when a Journald input is instantiated, if it is not supported, then then the input creation fails. A warning was added to the documentation stating the minimal version of Systemd.
A Ubuntu 2204 Vagrant Box is added for testing.
Checklist
I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Filebeat will refuse to start if a Journald input is configured and the host is running an unsupported version of Journald.
There should be no disruptions for the current users because the Journald input is still in technical preview.
Author's Checklist
fork
system call?How to test this PR locally
Start two VMs: Ubuntu 2204 and Archlinux
SSH into the Archlinux VM and update the system to get the fixed version of Systemd and install other dependencies
Run the tests
Build Filebeat with Journald support (you can do this from within the VM):
Run Filebeat in each VM:
./filebeat -e -v
using the followingfilebeat.yml
filebeat.yml
Assert that:
Related issues
## Use cases## ScreenshotsLogs
Filebeat will fail to start with: