Bug 1292805

Summary: Regression: journalctl -f broken (again) with initially empty filter result
Product: [Fedora] Fedora Reporter: Dominik Perpeet <dperpeet>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: goeran, johannbg, jsynacek, lnykryn, msekleta, s, stefw, systemd-maint, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-222-12.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-10 19:24:18 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 Dominik Perpeet 2015-12-18 12:09:25 UTC
Description of problem:

journalctl --follow will exit immediately if there are initially no matching entries.  Instead, it should block until a matching entry is appended to the journal.

This breaks how cockpit interacts with the journal. Tracked here: https://github.com/cockpit-project/cockpit/issues/3361

Example: If you have a new service unit that has never been started, the following will not give the expected result:

 term1# journalctl --follow -- _SYSTEMD_UNIT=something.service
 -- No entries --

 term2# systemctl start something

I would expect journalctl in term1 to block and then show the entries produced by 'something' when it is eventually started in term2.

Version-Release number of selected component (if applicable):
systemd-222-10.fc23.x86_64


How reproducible:
Always

Steps to Reproduce:
1. journalctl --follow -- _SYSTEMD_UNIT=something.service; echo Status $?

Actual results:
-- No entries --
Status 0

Expected results:
<no output and journalctl blocks forever>

Additional info:
This is a regression.
There was a similar effect reported in https://bugzilla.redhat.com/show_bug.cgi?id=1253649 - but that has since been fixed.
It works in systemd-222-8.fc23.x86_64

Atomic host currently uses this package and is also affected.

Comment 2 Fedora Update System 2016-01-08 09:48:05 UTC
systemd-222-12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-aae4b3b916

Comment 3 Fedora Update System 2016-01-09 04:27:18 UTC
systemd-222-12.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-aae4b3b916

Comment 4 Fedora Update System 2016-01-10 19:24:04 UTC
systemd-222-12.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.