Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1747333

Summary: Remaining files in temporal dir
Product: Red Hat Enterprise Linux 7 Reporter: Juan Orti Alcaine <jortialc>
Component: sos-collectorAssignee: Jake Hunsaker <jhunsaker>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.7   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-13 18:19:29 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 Juan Orti Alcaine 2019-08-30 07:10:09 UTC
Description of problem:
When using sos-collector with the --tmp-dir option, some files remain in the temporal directory after termination:

[root@rhel7 ~]# sos-collector --tmp-dir /var/tmp/sos --nodes rhvh1,rhvh2,rhvm --master rhvm
[root@rhel7 ~]# ls -la /var/tmp/sos
total 45752
drwxr-xr-x. 2 root root     4096 ago 30 09:00 .
drwxrwxrwt. 3 root root       62 ago 30 09:00 ..
-rw-------. 1 root root 16788720 ago 30 08:58 sosreport-rhvh1-rhvh-2019-08-30-papuiwb.tar.xz
-rw-------. 1 root root       33 ago 30 08:58 sosreport-rhvh1-rhvh-2019-08-30-papuiwb.tar.xz.md5
-rw-------. 1 root root 14703260 ago 30 08:58 sosreport-rhvh2-rhvh-2019-08-30-ddxtpbd.tar.xz
-rw-------. 1 root root       33 ago 30 08:58 sosreport-rhvh2-rhvh-2019-08-30-ddxtpbd.tar.xz.md5
-rw-------. 1 root root 14665944 ago 30 09:00 sosreport-rhvm-manager-2019-08-30-ewspgsm.tar.xz
-rw-------. 1 root root       33 ago 30 09:00 sosreport-rhvm-manager-2019-08-30-ewspgsm.tar.xz.md5
-rw-------. 1 root root   638140 ago 30 09:00 sosreport-rhvm-postgresql-2019-08-30-rxyfezq.tar.xz
-rw-------. 1 root root       33 ago 30 09:00 sosreport-rhvm-postgresql-2019-08-30-rxyfezq.tar.xz.md5
-rw-------. 1 root root    20986 ago 30 09:00 tmpH1q6Eo
-rw-------. 1 root root     2330 ago 30 09:00 tmptRidws


Version-Release number of selected component (if applicable):
sos-collector-1.7-5.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run sos-collector with the --tmp-dir option

Actual results:
There are left over files

Expected results:
Clean tmp dir

Additional info:

Comment 2 Juan Orti Alcaine 2019-09-12 12:10:23 UTC
I want to clarify that it's not only the tmp* files, but all the individual sosreports are also there.

If the --tmp-dir option is not used, the only resulting file is sos-collector-*.tar.gz

Comment 3 Jake Hunsaker 2019-09-13 18:19:29 UTC
Right, that's expected because of BZ#1747351. I meant to close this as a dupe of that BZ earlier, so I'll do that now.

To be clear - this behavior of temp files being left behind when using --tmp-dir is caused by the same problem in BZ#1747351, and the fix for that is included in sos-collector-1.8. Currently we are looking at 7.8.z for a release of that update.

*** This bug has been marked as a duplicate of bug 1747351 ***