[systemd-bugs] [Bug 90193] journalctl --directory doesn't follow rotated files properly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 27 05:49:50 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90193

--- Comment #2 from Sebastian Schindler <sebastian.schindler+bugzilla at travelping.com> ---
Comment on attachment 115371
  --> https://bugs.freedesktop.org/attachment.cgi?id=115371
short example to reproduce the error

To create an example that triggers the rotation which leads to the bug I did
the following steps:

-log something:
$logger a
$logger b

-save the coresponding journalentries:
$journalctl -n2 -o export >> entries.txt

-switch the timestamps and cursors of the entries (result named
switched_entries.txt, see attachment)
-this will cause the journalfile to be rotated after the first entry "a" is
written

-now follow a directory with journalctl
$journalctl --directory logtest/ -f

-create a new logfile with this entries:
$cat switched_entries.txt | systemd-journal-remote -o ~/logtest/a.journal -

-OUTPUT of journalctl:
No journal files were found.
Apr 27 10:07:40 virtual-fedora-sbs tpiadmin[9617]: a

-some new logging into the file:
$logger c
$journalctl -o export -n 1 | systemd-journal-remote -o ~/logtest/a.journal -

-leads to no new output, however:

-some logging into a new file in the same directory
$logger a2
$journalctl -o export -n 1 | systemd-journal-remote -o ~/logtest/b.journal -

-OUTPUT:
No journal files were found.
Apr 27 10:07:40 virtual-fedora-sbs tpiadmin[9617]: a
Apr 27 14:39:57 virtual-fedora-sbs tpiadmin[11424]: a2
//only the last line is actually new

-this new file will be followed until it gets rotated

-this problem also occurs, if the file gets rotated for other reasons than this
"errors", for example if simply a rotation due to size happens



-some weird interaction I noticed: If the logs are put into the journal file
two times:
$ journalctl -o export -n 1 | systemd-journal-remote -o ~/logtest/b.journal -
$ journalctl -o export -n 1 | systemd-journal-remote -o ~/logtest/b.journal -
-then the output of this doubled input is shown once, however the file isn't
properly followed after that (new entries won't show up)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150427/8c6d3ed0/attachment-0001.html>


More information about the systemd-bugs mailing list