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 - no journal is collected by logs plugin
Summary: no journal is collected by logs plugin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sos
Version: 8.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.3
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On: 1850925
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-25 08:13 UTC by Miroslav Hradílek
Modified: 2020-11-04 02:00 UTC (History)
7 users (show)

Fixed In Version: sos-3.9.1-5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1850925
Environment:
Last Closed: 2020-11-04 01:58:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 2130 0 None closed [logs] collect also non-persistent journal logs 2020-10-06 06:04:11 UTC
Red Hat Product Errata RHEA-2020:4534 0 None None None 2020-11-04 01:58:38 UTC

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


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