Bug 1850926
| Summary: | no journal is collected by logs plugin | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Miroslav Hradílek <mhradile> |
| Component: | sos | Assignee: | Pavel Moravec <pmoravec> |
| Status: | CLOSED ERRATA | QA Contact: | Miroslav Hradílek <mhradile> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.3 | CC: | agk, bmr, fkrska, jjansky, plambri, pmoravec, sbradley |
| Target Milestone: | rc | Keywords: | Regression |
| Target Release: | 8.3 | Flags: | 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
(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). 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 |