Bug 1923937

Summary: Automatically create directory for sos-cleaner default_mapping
Product: Red Hat Enterprise Linux 8 Reporter: Pavel Moravec <pmoravec>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Miroslav HradĂ­lek <mhradile>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: agk, bmr, jcastillo, mhradile, plambri, sbradley, theute
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sos-4.0-8.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 14:49:10 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:

Description Pavel Moravec 2021-02-02 09:34:37 UTC
Description of problem:
When /etc/sos/cleaner directory is missing, cleaner fails to store new default_mapping file due to:

[cleaner] Could not update mapping config file: [Errno 2] No such file or directory: '/etc/sos/cleaner/default_mapping'

sos clean should create the dir by itself, when it detects the file/dir is missing.

See https://github.com/sosreport/sos/issues/2393 for the same.


Version-Release number of selected component (if applicable):
sos-4.0-7


How reproducible:
100%


Steps to Reproduce:
rm -rf /etc/sos/cleaner/
sos report -o qpid --batch --build --clean

(or any other sos-clean execution)


Actual results:
[cleaner] Could not update mapping config file: [Errno 2] No such file or directory: '/etc/sos/cleaner/default_mapping'

.. and the file is not stored.


Expected results:
No such error, the default_mapping file should be created.


Additional info:

Comment 7 errata-xmlrpc 2021-05-18 14:49:10 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-2021:1604