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

Journald reader: correctly handle journalctl restart #42595

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

belimawr
Copy link
Contributor

@belimawr belimawr commented Feb 4, 2025

Proposed commit message

The journald reader would return an error and an empty message when journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader itself.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

## Disruptive User Impact
## Author's Checklist

How to test this PR locally

Related issues

## Use cases
## Screenshots
## Logs

@belimawr belimawr added bugfix backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify backport-9.0 Automated backport to the 9.0 branch labels Feb 4, 2025
@belimawr belimawr self-assigned this Feb 4, 2025
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 4, 2025
The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.
@belimawr belimawr force-pushed the 41331-handle-journalctl-restarts branch from a0edcb6 to 0d5ae7b Compare February 4, 2025 21:28
@belimawr belimawr added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Feb 4, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Feb 4, 2025
@belimawr belimawr marked this pull request as ready for review February 4, 2025 21:29
@belimawr belimawr requested a review from a team as a code owner February 4, 2025 21:29
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@pierrehilbert pierrehilbert requested a review from rdner February 5, 2025 12:53
@belimawr belimawr merged commit 1cd128b into elastic:main Feb 7, 2025
31 checks passed
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.

(cherry picked from commit 1cd128b)
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.

(cherry picked from commit 1cd128b)
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.

(cherry picked from commit 1cd128b)
mergify bot pushed a commit that referenced this pull request Feb 7, 2025
The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.

(cherry picked from commit 1cd128b)
belimawr added a commit that referenced this pull request Feb 7, 2025
The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.

(cherry picked from commit 1cd128b)

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
belimawr pushed a commit that referenced this pull request Feb 7, 2025
…restart (#42634)

The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.

(cherry picked from commit 1cd128b)
belimawr added a commit that referenced this pull request Feb 7, 2025
The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.

(cherry picked from commit 1cd128b)

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
belimawr pushed a commit that referenced this pull request Feb 7, 2025
…restart (#42632)

The journald reader would return an error and an empty message when
journalctl was restarting, that would break the multiline parser.

This commit fixes it by handling the "retry read" in the reader
itself.

(cherry picked from commit 1cd128b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify backport-9.0 Automated backport to the 9.0 branch bugfix Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filebeat's journald input might return an empty message that breaks multiline parser
3 participants