summaryrefslogtreecommitdiff
path: root/src/journal
AgeCommit message (Collapse)Author
2015-11-03journal: restore watchdog supportLennart Poettering
2015-11-03journalctl: when we fail to open a journal file, print whyLennart Poettering
When we enumerate journal files and encounter an invalid one, remember which this, and show it to the user. Note the possibly slightly surprising logic here: we store only one path per error code. This means we show all error kinds but not every actual error we encounter. This has the benefit of not requiring us to keep a potentially unbounded list of errors with their sources around, but can still provide a pretty complete overview on the errors we encountered. Fixes #1669.
2015-11-03sd-journal: various clean-ups and modernizationsLennart Poettering
- Always print a debug log message about files and directories we cannot open right when it happens instead of the caller, thus reducing the number of places where we need to generate the debug message. - Always push the errors we encounter immediately into the error set, when we run into them, instead of in the caller. Thus, we never forget to push them in. - Use stack instead of heap memory where we can. - Make remove_file() void, since it cannot fail anyway and always returned 0. - Make local machine check of journal directories explicit in a function, to make things more readable. - Port to all directory listing loops FOREACH_DIRENT_ALL() - sd-daemon is library code, hence never log at higher log levels than LOG_DEBUG.
2015-11-03journalctl: continue operation, even if we run into an invalid fileLennart Poettering
2015-11-03journal: return better error for empty filesZbigniew Jędrzejewski-Szmek
When reading stuff, we should only return EIO when an actual read error occured, not when we don't like the data for whatever reason. We already return ENODATA for all other kinds of file truncation, hence do the same for the most obvious kind, so that callers know what ENODATA means.
2015-11-02Merge pull request #1725 from ssahani/word-journalDaniel Mack
sd-journal.c: port to extract_first_word
2015-11-01journald: never block when sending messages on NOTIFY_SOCKET socketLennart Poettering
Otherwise we might run into deadlocks, when journald blocks on the notify socket on PID 1, and PID 1 blocks on IPC to dbus-daemon and dbus-daemon blocks on logging to journald. Break this cycle by making sure that journald never ever blocks on PID 1. Note that this change disables support for event loop watchdog support, as these messages are sent in blocking style by sd-event. That should not be a big loss though, as people reported frequent problems with the watchdog hitting journald on excessively slow IO. Fixes: #1505.
2015-11-01sd-journal.c: port to extract_first_wordSusant Sahani
2015-10-27util-lib: move inotify-related definitions to fs-util.[ch]Lennart Poettering
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: split out globbing related calls into glob-util.[ch]Lennart Poettering
2015-10-27util-lib: split out printf() helpers to stdio-util.hLennart Poettering
2015-10-27io-util.h: move iovec stuff from macro.h to io-util.hLennart Poettering
2015-10-27util-lib: split out syslog-related calls into syslog-util.[ch]Lennart Poettering
2015-10-27util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch]Lennart Poettering
2015-10-27src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → ↵Lennart Poettering
capability-util.[ch] The files are named too generically, so that they might conflict with the upstream project headers. Hence, let's add a "-util" suffix, to clarify that this are just our utility headers and not any official upstream headers.
2015-10-27util-lib: move more locale-related calls to locale-util.[ch]Lennart Poettering
2015-10-27util-lib: move string table stuff into its own string-table.[ch]Lennart Poettering
2015-10-27util-lib: move a number of fs operations into fs-util.[ch]Lennart Poettering
2015-10-27util-lib: split out file attribute calls to chattr-util.[ch]Lennart Poettering
2015-10-27util-lib: split xattr-related calls into xattr-util.[ch]Lennart Poettering
2015-10-27util-lib: introduce dirent-util.[ch] for directory entry callsLennart Poettering
Also, move a couple of more path-related functions to path-util.c.
2015-10-27util-lib: split out resource limits related calls into rlimit-util.[ch]Lennart Poettering
2015-10-27util-lib: move more file I/O related calls into fileio.[ch]Lennart Poettering
2015-10-27util: remove path_get_parent(), in favour of dirname_malloc()Lennart Poettering
We don't need two functions that do essentialy the same, hence drop path_get_parent(), and stick to dirname_malloc(), but move it to path-util.[ch].
2015-10-27util-lib: split out hex/dec/oct encoding/decoding into its own fileLennart Poettering
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-26Merge pull request #1676 from poettering/util-lib-2Tom Gundersen
split up util.[ch] into more pieces, and other stuff
2015-10-26journal: add missing includeTom Gundersen
2015-10-26Merge pull request #1681 from ssahani/journalLennart Poettering
journald-server: port to extract_first_word
2015-10-26journald-server: port to extract_first_wordSusant Sahani
2015-10-26util-lib: split out user/group/uid/gid calls into user-util.[ch]Lennart Poettering
2015-10-26util-lib: split out IO related calls to io-util.[ch]Lennart Poettering
2015-10-25Merge pull request #1654 from poettering/util-libTom Gundersen
Various changes to src/basic/
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-25Merge pull request #1663 from poettering/journal-compress-fixZbigniew Jędrzejewski-Szmek
journal: fix error handling when compressing journal objects
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-10-24util: split out escaping code into escape.[ch]Lennart Poettering
This really deserves its own file, given how much code this is now.
2015-10-24path-util: unify how we process paths specified on the command lineLennart Poettering
Let's introduce a common function that makes relative paths absolute and warns about any errors while doing so.
2015-10-24util-lib: get_current_dir_name() can return errors other than ENOMEMLennart Poettering
get_current_dir_name() can return a variety of errors, not just ENOMEM, hence don't blindly turn its errors to ENOMEM, but return correct errors in path_make_absolute_cwd(). This trickles down into a couple of other functions, some of which receive unrelated minor fixes too with this commit.
2015-10-24journal: irrelevant coding style fixesLennart Poettering
2015-10-24journal: fix error handling when compressing journal objectsLennart Poettering
Let's make sure we handle compression errors properly, and don't misunderstand an error for success. Also, let's actually compress things if lz4 is enabled. Fixes #1662.
2015-10-24Merge pull request #1659 from vcaputo/journal_verify_envalidLennart Poettering
journal: s/Envalid/Invalid/
2015-10-23journal: s/Envalid/Invalid/Vito Caputo
2015-10-23Merge pull request #1653 from keszybz/lz4-compress-timeLennart Poettering
Limit test-compress-benchmark to approx. 12 s of runtime
2015-10-23test-compress-benchmark: properly initialize bufferZbigniew Jędrzejewski-Szmek
We were compressing unitialized memory, which should not result in any problems, but is inelegant.
2015-10-23test-compress-benchmark: limit default runtime to 2 seconds per subtestZbigniew Jędrzejewski-Szmek
If both lz4 and xz are enabled, this results in a limit of 2×3×2 s ~= 12 s runtime. Previous implementation started with really small buffer sizes. When combined with a short time limit this resulteded in abysmal results for xz. It seems that the initialization overead is really significant for small buffers. Since xz will not be used by default anymore, this does not seem worth fixing. Instead buffer sizes are changed to run a pseudo-random non-repeating pattern. This should allow reasonable testing for all buffer sizes. For testing, both runtime and the buffer size seed can be specified on the command line. Sufficiently large runtime allows all buffer sizes up to 1MB to be tested.
2015-10-22journalctl: clarify -q optionEvgeny Vereshchagin
-q suppresses info messages too
2015-10-19journald: make sure r is always initializedLennart Poettering
2015-10-19journal: fix bad memory freeingLennart Poettering