Bug 847178

Summary: rsyslog missing early user-space boot messages on systemd system
Product: [Fedora] Fedora Reporter: Scott Shambarger <scott-fedora>
Component: rsyslogAssignee: Tomas Heinrich <theinric>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: pvrabec, theinric, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-04 21:10:55 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 Scott Shambarger 2012-08-10 02:53:46 UTC
Description of problem:
Early user-space log messages are sent to systemd-journald, and when rsyslog is started, they are never flushed through the log system. 

Version-Release number of selected component (if applicable):
systemd-44-17
rsyslog-5.8.10-2

How reproducible:
On every boot

Steps to Reproduce:

Find a service that logs before rsyslog is started... OR create a test case by forcing rsyslog.service to after network.target (I do this so I can use udb sockets to receive remote logs) by adding the following to rsyslog.service Unit's section:

After=network.target

Then create a new logtest.service file with the following that will log before network.target:
---
[Unit]
Description=LogTest
Before=network.target

[Service]
User=nobody
Type=oneshot
ExecStart=/bin/logger -p local3.info test message

[Install]
WantedBy=multi-user.target
---

Enable logtest.service, and reboot.

Actual results:

Once system is up, grep for "test message" in /var/log/messages (rsyslog's file, "test messages" is not found)

Run journalctl | grep "test message":
Aug 09 15:54:54 testhost logger[629]: test message

Expected results:

/var/log/messages should contain the logged message from before rsyslog was started...

Additional info:

After startup, running "/bin/logger -p local3.info test message" creates the expected log in /var/log/messages... but that message is missed when logged before rsyslog is started.

NOTE: This does not include kmsg messages, which are loaded from /proc/kmsg when rsyslog is started, it only includes user-space messages sent to /dev/log before rsyslog is started.

The systemd package includes a file /etc/rsyslog.d/listen.conf which has rsyslog pull it's messages from /run/systemd/journal/syslog, but those messages don't appear to include anything before rsyslog is started, so some form of flush from journald to rsyslog is needed so the messages can be properly filtered and filed.

Comment 1 Fedora End Of Life 2013-07-04 04:00:14 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Scott Shambarger 2013-07-10 23:56:22 UTC
Still an issue in F18, updating to that release.

Comment 3 Fedora End Of Life 2013-12-21 08:40:37 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Tomas Heinrich 2013-12-22 13:02:09 UTC
Could you retest and potentially switch to f19+?

Comment 5 Zbigniew Jędrzejewski-Szmek 2013-12-22 13:47:45 UTC
rsyslog now pull the messages itself (AFAIK), and this indeed should be fixed.

Comment 6 Scott Shambarger 2014-01-04 21:10:55 UTC
Just tested in F20.. rsyslog.conf now by default pulls directly from systemd-journal (and no longer from syslog.socket), so early boot messages are picked up and the test above works.

Closing as fixed.