RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1419228 - rsyslog imjournal module no longer receives logs after switch to persistent journald configuration
Summary: rsyslog imjournal module no longer receives logs after switch to persistent j...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog
Version: 7.3
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: Karel Srot
Vladimír Slávik
URL:
Whiteboard:
Depends On: 1446140
Blocks: 1420851
TreeView+ depends on / blocked
 
Reported: 2017-02-04 00:45 UTC by Greg Bailey
Modified: 2021-06-10 11:54 UTC (History)
7 users (show)

Fixed In Version: rsyslog-8.24.0-10.el7
Doc Type: Enhancement
Doc Text:
Feature: Make imjournal to be more robust and to be able to handle switching between runtime and persistent Journal. Reason: When Journal was switched imjournal stops logging at all. Result: The imjournal module can handle switching from runtime to persistent Journal without restarting rsyslog.service and removing statefile.
Clone Of:
Environment:
Last Closed: 2017-08-01 09:56:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
rsyslog patch (2.91 KB, patch)
2017-03-13 15:11 UTC, Radovan Sroka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github rsyslog rsyslog pull 1747 0 None closed switching to persistent journal possible without rsyslog restart, 2020-06-30 01:10:03 UTC
Red Hat Product Errata RHBA-2017:2306 0 normal SHIPPED_LIVE rsyslog bug fix and enhancement update 2017-08-01 12:41:59 UTC

Description Greg Bailey 2017-02-04 00:45:13 UTC
Description of problem:

When switching to persistent journald storage (section 2.10.5 of the Red Hat Enterprise System Admin Guide), rsyslog does not appear to see any additional journal messages until rsyslog itself is restarted.

Version-Release number of selected component (if applicable):
rsyslog-7.4.7-16.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1.  Start with non-persistent journald config (no /var/log/journal directory)
2.  Do something that would log to /var/log/secure (like "ssh localhost" and give a bogus password).
3.  Observe that /var/log/secure has some entries for the failed sshd session
4.  Configure persistent logging, with "mkdir /var/log/journal; systemctl restart systemd-journald"
5.  Repeat step 2 above (another ssh connection)
6.  /var/log/secure does not have any additional logging until rsyslog is restarted (but journalctl will show them)

Actual results:
Missing entries in files written to by rsyslogd

Expected results:
Complete log entries

Additional info:

Comment 2 Radovan Sroka 2017-03-13 15:11:18 UTC
Created attachment 1262471 [details]
rsyslog patch

Comment 4 Karel Srot 2017-03-20 08:40:47 UTC
Hi Radovan,
could you please describe in more detail what changes for rsyslog when persistent journald storage is configured? Does rsyslog continue reading messages from the socket? Is it really expected that rsyslog would handle this configuration change without a restart?
Thank you.

Comment 5 Radovan Sroka 2017-03-20 09:23:47 UTC
(In reply to Karel Srot from comment #4)
> Hi Radovan,
> could you please describe in more detail what changes for rsyslog when
> persistent journald storage is configured? Does rsyslog continue reading
> messages from the socket? Is it really expected that rsyslog would handle
> this configuration change without a restart?
> Thank you.

Hi Karel,

when we are switching journal between runtime and persistent, it changes file descriptor/s so imjournal is not able to read anything and it polls forever.

This patch handles return values from journal API better and after systemd fix above imjournal is able to distinguish whether journal changed file descriptor/s or not.

I think that is a bug but tolerated one so far.

It could be simply tested like in description.

After switching journal files, rsyslog is trying to apply last valid cursor from statefile so few messages can appear again it depends on persist state interval.
It is because when rsyslog find out that journal has been changed it is impossible to get cursor. Journal structure is something like undefined so this is why we are using last valid cursor form statefile.

Comment 11 errata-xmlrpc 2017-08-01 09:56:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2306


Note You need to log in before you can comment on or make changes to this bug.