Bug 2012856
| Summary: | sos report --dry-run raises uncaught exception | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Pavel Moravec <pmoravec> | |
| Component: | sos | Assignee: | Pavel Moravec <pmoravec> | |
| Status: | CLOSED ERRATA | QA Contact: | Miroslav HradĂlek <mhradile> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | high | |||
| Version: | 8.6 | CC: | agk, bmr, fkrska, mhradile, plambri, rduda, sbradley, theute | |
| Target Milestone: | rc | Keywords: | OtherQA, Triaged | |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | sos-4.2-2.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2012858 (view as bug list) | Environment: | ||
| Last Closed: | 2022-05-10 15:16:36 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: | ||||
| Bug Blocks: | 2012858 | |||
|
Description
Pavel Moravec
2021-10-11 13:21:00 UTC
(I manually checked this is fixed (not sure how valid is a test from a person in conflict of interests like me (author & self-tester) :) ):
# rpm -q sos
sos-4.2-1.el8.noarch
# sos report --dry-run --batch --build -o logs
sosreport (version 4.2)
..
Setting up archive ...
Setting up plugins ...
[plugin:logs] skipped command 'journalctl --disk-usage': (dry run)
[plugin:logs] skipped command 'ls -alRh /var/log/': (dry run)
caught exception in plugin method "logs.setup()"
writing traceback to sos_logs/logs-plugin-errors.txt
Running plugins. Please wait ...
Starting 1/1 logs [Running: logs]
Finished running plugins
Your sosreport build tree has been generated in:
/var/tmp/sosreport-pmoravec-rhel8-2021-11-04-igaqshi
# cat /var/tmp/sosreport-pmoravec-rhel8-2021-11-04-igaqshi/sos_logs/logs-plugin-errors.txt
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/sos/report/__init__.py", line 977, in setup
plug.setup()
File "/usr/lib/python3.6/site-packages/sos/report/plugins/logs.py", line 66, in setup
self.add_journal(since=since, tags='journal_full', priority=100)
File "/usr/lib/python3.6/site-packages/sos/report/plugins/__init__.py", line 2512, in add_journal
priority=priority)
File "/usr/lib/python3.6/site-packages/sos/report/plugins/__init__.py", line 1660, in _add_cmd_output
self.log_skipped_cmd(pred, soscmd.cmd, kmods=bool(pred.kmods),
AttributeError: 'NoneType' object has no attribute 'kmods'
#
And on fixed version:
# rpm -q sos
sos-4.2-2.el8.noarch
# sos report --dry-run --batch --build -o logs
sosreport (version 4.2)
..
Setting up archive ...
Setting up plugins ...
[plugin:logs] skipped command 'journalctl --disk-usage': (dry run)
[plugin:logs] skipped command 'ls -alRh /var/log/': (dry run)
[plugin:logs] skipped command 'journalctl --no-pager ': (dry run)
[plugin:logs] skipped command 'journalctl --no-pager --catalog --boot ': (dry run)
[plugin:logs] skipped command 'journalctl --no-pager --catalog --boot -1': (dry run)
Running plugins. Please wait ...
Starting 1/1 logs [Running: logs]
Finished running plugins
Your sosreport build tree has been generated in:
/var/tmp/sosreport-pmoravec-rhel8-2021-11-04-lwdjjug
# ls /var/tmp/sosreport-pmoravec-rhel8-2021-11-04-lwdjjug/sos_logs/
sos.log ui.log
#
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-2022:1998 |