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
journalctl --sync should guarantee all currently in flight logs are written to the journal #32539
Comments
hmm what's wrong with the existing journalctl --sync? what am i missing? |
@poettering AFAIK that doesn't seem to do anything with logs that haven't been read from the service's file descriptor(s) yet? If I call If I currently do something like this
The journalctl grep might return an entry, or it might not return any entries at all. What I want is a way to ensure that that call to |
hmm, the idea was that the --sync stuff does exactly what you are looking for here, i.e. it only returns once every stream was fully processed. |
|
…ethod Otherwise, we may not be able to read newer journal entries even after 'journalctl --sync' is called. Closing systemd#32539.
-> #32617. |
Component
No response
Is your feature request related to a problem? Please describe
We currently have a bunch of racy code in our integration tests to check if a message was written to the journal. This is because there's is no command in
journalctl
to wait until all currently in flight logs have been written to the journal. We could implement this by iterating over all open log streams, checking the number of bytes in each stream and only reading up to that amount from the socket. This will guarantee all currently in flight logs have been written to the journal.Describe the solution you'd like
No response
Describe alternatives you've considered
No response
The systemd version you checked that didn't have the feature you are asking for
No response
The text was updated successfully, but these errors were encountered: