-
Bug
-
Resolution: Done-Errata
-
Undefined
-
None
-
rhel-8.9.0.z
-
None
-
None
-
None
-
sst_cee_supportability
-
None
-
False
-
-
None
-
None
-
Pass
-
None
-
None
What were you trying to do that didn't work?
Having own preset, using it raises uncaught exception.
Please provide the package NVR for which bug is seen:
sos-4.6.1-1
How reproducible:
100%
Steps to reproduce
- /etc/sos/presets.d/sostestpreset with content: {"sostestpreset":
Unknown macro: {"desc"}
}
- sos report --preset sostestpreset --batch
Expected results
2. runs flawlessly, uses configs from the preset
Actual results
2. fails with:
Could not initialize 'report': 'SoSReport' object has no attribute 'flog'
The fix is kind of:
def set_loggers_verbosity(self, verbosity): if verbosity: if getattr(self, 'flog', None): self.flog.setLevel(logging.DEBUG) if getattr(self, 'console', None): if self.opts.verbosity > 1: self.console.setLevel(logging.DEBUG) else: self.console.setLevel(logging.WARNING) else: self.console.setLevel(logging.WARNING)
- links to
-
RHBA-2024:128483 sos bugfix and enhancement update