Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1850926

Summary: no journal is collected by logs plugin
Product: Red Hat Enterprise Linux 8 Reporter: Miroslav Hradílek <mhradile>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Miroslav Hradílek <mhradile>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: agk, bmr, fkrska, jjansky, plambri, pmoravec, sbradley
Target Milestone: rcKeywords: Regression
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sos-3.9.1-5.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1850925 Environment:
Last Closed: 2020-11-04 01:58:15 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:
Bug Depends On: 1850925    
Bug Blocks:    

Description Miroslav Hradílek 2020-06-25 08:13:55 UTC
Build sos-3.9.1-4.el8.noarch (unreleased) from 8.3 is also affected.

+++ This bug was initially created as a clone of Bug #1850925 +++

Description of problem:

Commit
https://github.com/sosreport/sos/commit/745b4a236a0255ea76ffd273f3e2028ac46b4a89

introduced changes in journal collection and currently prevents collection of any journal unless '/var/log/journal/' exists.

I believe this is regression compared to previous versions of sosreport and at least some journal should be collected.

Version-Release number of selected component (if applicable):
sos-3.9-2.el7.noarch (unreleased)

How reproducible:
100%

Steps to Reproduce:
1. sosreport -o logs --batch -vvv
2. tar -tf resulting-sosreport.tar.xz

Actual results:
No journal is collected.

Expected results:
Some journal is collected.

Additional info:
Previously sosreport was collecting only full journal which may cause hang of sosreport collection on some systems.
Later it was incorrectly fixed to collect --since limited journal while it was still collecting whole journal as well (redundancy).
Now it is supposed to collect 3 journals (1 since limited, current boot, last boot). This is another redundancy when no '--since' is used. Because full journal (collected in such case) still contains current and last boot.

Opinion (what I'd consider cautious):
In case of non persistent journal:
  * No since defined: collect whole journal.
  * Since defined: collect --since limited journal.
In case of persistent journal:
  * No since defined: collect only current and last boot.
  * Since defined: collect --since limited journal.
--all-logs override: collect whole journal despite since and persistence.

Comment 1 Pavel Moravec 2020-06-25 11:54:20 UTC
(In reply to Miroslav Hradílek from comment #0)

> Additional info:
> Previously sosreport was collecting only full journal which may cause hang
> of sosreport collection on some systems.
> Later it was incorrectly fixed to collect --since limited journal while it
> was still collecting whole journal as well (redundancy).
> Now it is supposed to collect 3 journals (1 since limited, current boot,
> last boot). This is another redundancy when no '--since' is used. Because
> full journal (collected in such case) still contains current and last boot.
> 
> Opinion (what I'd consider cautious):
> In case of non persistent journal:
>   * No since defined: collect whole journal.
>   * Since defined: collect --since limited journal.
> In case of persistent journal:
>   * No since defined: collect only current and last boot.
>   * Since defined: collect --since limited journal.
> --all-logs override: collect whole journal despite since and persistence.

(rather my opinion, I will open an issue in upstream to discuss it there)

We should apply --since option (if set) to also "catalog" journal outputs, otherwise the option is ignored in those commands.

taking "catalog" journal outputs supersets "noncatalog" outputs, making the "noncatalog" one redundant - we do so in few cases where the duplicate outputs serve different purposes (like "catalog" is more verbose, while "noncatalog" easier to follow and/or parse).

So imho sufficent fix would be:

@@ -67,8 +67,8 @@ class Logs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, CosPlugin):
             os.path.exists("/run/log/journal/")
         if journal and self.is_service("systemd-journald"):
             self.add_journal(since=since)
-            self.add_journal(boot="this", catalog=True)
-            self.add_journal(boot="last", catalog=True)
+            self.add_journal(boot="this", catalog=True, since=since)
+            self.add_journal(boot="last", catalog=True, since=since)
             if self.get_option("all_logs"):
                 self.add_copy_spec([
                     "/var/log/journal/*",


See https://github.com/sosreport/sos/issues/2132 for the discussion. Anyway, I think we can live in 8.3 with the current behaviour (dont want to rush upstream discussion to squeeze backported outcome to 8.3).

Comment 8 errata-xmlrpc 2020-11-04 01:58:15 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 (sos bug fix and enhancement update), 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/RHEA-2020:4534