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

Replace github.com/coreos/go-systemd/v22/sdjournal by journalctl #40061

Merged
merged 61 commits into from
Aug 9, 2024

Commits on Aug 7, 2024

  1. [WIP] Reading journal file with journalctl

    New reader to read journald using jounralclt. The reader can read from
    files and supports matchers.
    
    A test is added to compare both readers.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    999f954 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f224875 View commit details
    Browse the repository at this point in the history
  3. Commit new reader

    Commit new reader and add timestamp parsing
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    a6128bd View commit details
    Browse the repository at this point in the history
  4. Improve tests

    Improve comparison test by removing fields that were not present in
    the go-systemd implementation.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    bb62b30 View commit details
    Browse the repository at this point in the history
  5. Set missing fields

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    c55ce4d View commit details
    Browse the repository at this point in the history
  6. Add journal to test matchers

    Add a journal file to test matchers and some example code of how to
    generate a user journal file for testing
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    4361ee1 View commit details
    Browse the repository at this point in the history
  7. Add test for matchers

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    5d70aaf View commit details
    Browse the repository at this point in the history
  8. Add fork/exec syscalls

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    1ca3aa0 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c17b406 View commit details
    Browse the repository at this point in the history
  10. fix seek options

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    3a51434 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ebfd5fb View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0fa3f8f View commit details
    Browse the repository at this point in the history
  13. fix reference

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    5ca2067 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    7cef9e7 View commit details
    Browse the repository at this point in the history
  15. Remove journalread and simplify seek mode

    This commit fully removes the `jouranlread` package that was
    responsible for reading the journal using
    `github.com/coreos/go-systemd/v22/sdjournal`.
    
    The seek mode is also greatly simplified.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    69073fb View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    1e29fec View commit details
    Browse the repository at this point in the history
  17. fix constants

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    2b1da61 View commit details
    Browse the repository at this point in the history
  18. comment out failing tests

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    54fa0f0 View commit details
    Browse the repository at this point in the history
  19. Fix seek/cursor tests

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    7d1ab6f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4995848 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    d6cca1b View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    b46433a View commit details
    Browse the repository at this point in the history
  23. remove un-used fields from config

    Because we're tailing journalctl, having a backoff config does not
    make sense any more.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    85a01c8 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    876be54 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    19ab55e View commit details
    Browse the repository at this point in the history
  26. Address lint Waring's

    - Remove unused methods
    - Remove unused variables
    - Fix error wrapping formatting
    - Simplify code
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    42f5d83 View commit details
    Browse the repository at this point in the history
  27. Refactor/clean up code

    - Fix types
    - Remove unused code/config options
    - Refactor variable names
    - Fix typos and documentation
    - Clean up log entries
    - Improve error messages
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    763d9fe View commit details
    Browse the repository at this point in the history
  28. Add changelog

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    3e51599 View commit details
    Browse the repository at this point in the history
  29. Update reference files

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    842e20d View commit details
    Browse the repository at this point in the history
  30. Unblocks Next if cancel is cancelled and add documentation

    Add documentation to all exported methods and types from
    `journalctl/reader.go`.
    
    `Reader.Next` now returns immediately if the cancel is cancelled.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    7372e99 View commit details
    Browse the repository at this point in the history
  31. Gracefully terminate input and use map[string]any for events

    - Gracefully terminate input on canceller cancellation, the Reader now
    returns ErrCancelled then the journald input reads it and gracefully
    returns without bubbling up the error
    
    - Journal events are now parsed as map[string]any because in some
    cases there can be binary data like in some core dumps.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    d3782d1 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    728b0b7 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    e1f8f08 View commit details
    Browse the repository at this point in the history
  34. Improve documentation

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    253db5d View commit details
    Browse the repository at this point in the history
  35. update changelog

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    409ba3e View commit details
    Browse the repository at this point in the history
  36. format/update files

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    be0c064 View commit details
    Browse the repository at this point in the history
  37. Better log errors

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    2cff54c View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    a1eb4b0 View commit details
    Browse the repository at this point in the history
  39. Fix error handling when journalctl

    This commit fixes two problems:
    - The output from stderr was read and sent to a channel, but the
    channel was never read.
    - Stderr was read in memory until EOF, which could lead to an
    uncontrolled memory growth.
    
    Now each line is sent to an unbuffered channel until EOF or an read
    error occurs. The Stop method now reads from this channel until the
    end (channel close) or a timeout of 1 minute occurs.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    1638e3c View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    a220b9b View commit details
    Browse the repository at this point in the history
  41. fix type mismatch in test

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    af93cbb View commit details
    Browse the repository at this point in the history
  42. Fix issue with timestamp comparison on tests.

    The locale/timezone from the host running the the test could generate
    a timestamp object different from the golden events, this commit fixes
    it by comparing them with their `Equal`.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    15536f6 View commit details
    Browse the repository at this point in the history
  43. Improve seek since times to avoid issues on different hosts

    On TestInputSeek set the since option to a time between the first and
    second entries to avoid issues with different hosts.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    dc3a251 View commit details
    Browse the repository at this point in the history
  44. Add build tags to mock file

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    3b99814 View commit details
    Browse the repository at this point in the history
  45. Add debug logs to tests

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    6b74934 View commit details
    Browse the repository at this point in the history
  46. Fix race condition on Close

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    4781a27 View commit details
    Browse the repository at this point in the history
  47. fix broken since timestamp

    The since tests was broken because newer versions of Jouranlctl
    accepts time stamps on RFC3339, but older versions do not.
    
    The Reader now formats the since parameter in a format accepted by
    older versions of systemd. The since tests ensures the timestamp is in
    the local timezone to avoid conflicts with jouranlct.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    7cc87f2 View commit details
    Browse the repository at this point in the history
  48. Add Ubuntu 2204 to Vagrant

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    02ed4b6 View commit details
    Browse the repository at this point in the history
  49. Fix failing tests due to journal format

    This commit fixes tests that were failing due to an incompatible
    journal version. The new journal file was generated with journald
    249 (249.11-0ubuntu3.12).
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    7e4325f View commit details
    Browse the repository at this point in the history
  50. Improve docs and fix typos

    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    5206107 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    146d285 View commit details
    Browse the repository at this point in the history
  52. Add syscalls required to call journalctl

    This commit adds the missing syscalls to our seccomp policy so
    Filebeat can start the journalctl process.
    
    The syscalls were acquired by running Filebeat with the seccomp
    default action set to "log", and running Auditbeat to collect those
    logs and convert the syscall number into a name accepted by our
    seccomp policy.
    belimawr committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    284f7b1 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    4caef50 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. Configuration menu
    Copy the full SHA
    e1e783b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e8ed98b View commit details
    Browse the repository at this point in the history
  3. Update changelog

    Add the correct syscalls to the changelog and move the entry under
    breaking changes.
    belimawr committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    1f58c7e View commit details
    Browse the repository at this point in the history
  4. Merge branch 'journalctl-for-journald-input' of github.com:belimawr/b…

    …eats into journalctl-for-journald-input
    belimawr committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    6572cb9 View commit details
    Browse the repository at this point in the history
  5. Update changelog

    Fix merge conflicts in the changelog and improve working of one entry.
    belimawr committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    35a5d8c View commit details
    Browse the repository at this point in the history
  6. Re-add removed syscall from seccomp

    Re-add a syscall that was mistakenly removes from the default seccomp
    policy.
    belimawr committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    acbe1d8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ec6fc35 View commit details
    Browse the repository at this point in the history
  8. Fix log entry

    Fixes a log entry that was mixing keys with data
    belimawr committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    1359a65 View commit details
    Browse the repository at this point in the history