Bug 1253649
Summary: | Regression: journalctl -f broken with initially empty filter result | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Marius Vollmer <mvollmer> |
Component: | systemd | Assignee: | Jan Synacek <jsynacek> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 22 | CC: | dperpeet, johannbg, jsynacek, lnykryn, lpoetter, msekleta, mvollmer, s, stefw, systemd-maint, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-09-11 06:42:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Marius Vollmer
2015-08-14 11:27:40 UTC
This breaks Cockpit: https://github.com/cockpit-project/cockpit/issues/2571 This is caused by 0273-journalctl-properly-detect-empty-journal-files.patch which causes journalctl to exit early when there no matches, even with --follow. That patch should probably look like this: diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -2057,6 +2057,10 @@ int main(int argc, char *argv[]) { log_error_errno(r, "Failed to iterate through journal: %m"); return EXIT_FAILURE; } + if (r == 0 && !arg_follow) { + printf("-- No entries --\n"); + goto finish; + } if (!arg_follow) pager_open_if_enabled(); This regression is in systemd-219-21 systemd-219-20 isn't affected. The commit containing the regression: commit 02ab86c732576a71179ce12e97d44c289833236d Author: Lennart Poettering <lennart> Date: Fri Jul 24 02:10:32 2015 +0200 journalctl: properly detect empty journal files When we encounter a journal file with exactly zero entries, print a nice message and exit, and don't print a weird error message. The fix posted by Marius above still has the symptom of printing strange messages like: Failed to get realtime timestamp: Cannot assign requested address Posted a patch upstream which accounts for that: https://github.com/systemd/systemd/pull/958 Fix merged upstream: https://github.com/systemd/systemd/pull/958 Cockpit has temporarily disabled testing the journal in its test suite for this regressed systemd version: 219-21 However Cockpit is still broken by this bug. |