Bug 1609135

Summary: ceph plugin should not collect /var/lib/ceph/tmp/*mnt*
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Hradílek <mhradile>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Miroslav Hradílek <mhradile>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: agk, bmr, gavin, plambri, sbradley
Target Milestone: rc   
Target Release: 7.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sos-3.6-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1614955 (view as bug list) Environment:
Last Closed: 2018-10-30 10:33:42 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: 1614955    

Description Miroslav Hradílek 2018-07-27 05:36:53 UTC
Description of problem:
As part of a bug 1449904 there was a forbidden path for mnt files in /var/lib/ceph/tmp/. After update, sosreport collects them again. 

I believe this is a regression caused by accidentally removing leading "/" character:
"var/lib/ceph/tmp/*mnt*"
 vs.
"/var/lib/ceph/tmp/*mnt*"


Version-Release number of selected component (if applicable):
Unreleased! sos-3.6-3.el7.noarch

How reproducible:
100%

Steps to Reproduce:
# mkdir -p /var/lib/ceph/tmp
# echo "mock" > /var/lib/ceph/tmp/mnt.12345
# sosreport --all-logs -o ceph -v -v -v --batch

Actual results:
. . .
[plugin:ceph] recursively adding 'tmp' from '/var/lib/ceph/'
[plugin:ceph] recursively adding 'mnt.12345' from '/var/lib/ceph/tmp'
[plugin:ceph] copying path '/var/lib/ceph/tmp/mnt.12345' to archive:'/var/lib/ceph/tmp/mnt.12345'
. . .
Your sosreport has been generated and saved in:
  /var/tmp/sosreport-sheep-7-2018-07-27-cqernoe.tar.xz
. . .
# tar -tf /var/tmp/sosreport-sheep-7-2018-07-27-cqernoe.tar.xz | grep mnt.12345
sosreport-sheep-7-2018-07-27-cqernoe/var/lib/ceph/tmp/mnt.12345

Expected results:
(output from sos-3.5-9.el7_5.noarch)
. . .
[plugin:ceph] recursively adding 'tmp' from '/var/lib/ceph/'
[plugin:ceph] recursively adding 'mnt.12345' from '/var/lib/ceph/tmp'
[plugin:ceph] skipping forbidden path '/var/lib/ceph/tmp/mnt.12345'
. . .
Your sosreport has been generated and saved in:
  /var/tmp/sosreport-sheep-7.lab.eng.brq.redhat.com-20180727051840.tar.xz
. . .
# tar -tf /var/tmp/sosreport-sheep-7.lab.eng.brq.redhat.com-20180727051840.tar.xz | grep mnt.12345

Comment 2 Pavel Moravec 2018-07-27 06:31:33 UTC
Indeed, https://github.com/sosreport/sos/commit/29a40b793345443b1fa71ca268858eb5536ecd8d#diff-b83da889da0171d319901e2273793b32 wrongly updated several forbidden paths.

Good catch.

Comment 6 errata-xmlrpc 2018-10-30 10:33:42 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, 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-2018:3144