Bug 598978 - RFE: provide a way to specify destination filename
Summary: RFE: provide a way to specify destination filename
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sos
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact: David Kutálek
Keywords: FutureFeature
Depends On:
Blocks: 589147 829069
TreeView+ depends on / blocked
Reported: 2010-06-02 13:27 UTC by Denys Vlasenko
Modified: 2012-06-05 21:38 UTC (History)
9 users (show)

Clone Of:
: 829069 (view as bug list)
Last Closed: 2010-11-10 21:38:23 UTC

Attachments (Terms of Use)

Description Denys Vlasenko 2010-06-02 13:27:16 UTC
bug 589147 is caused by sosreport trying to save the file in /tmp, which is prohibited by selinux.

abrt later copies the file to a abrt crash dump directory.

Please provide a sosreport command line option to specify the destination file. If this causes problems with picking the right compression method, for example:

sosreport ... -o /path/to/file.tar.gz
sosreport ... -o /path/to/file.tar.bz2

- you might find it non-trivial to teach sosreport to figure out how to conform to tarfile extension - then I'd settle for an option which merely specifies a destination directory or destination basename (without .gz etc)

Comment 2 Adam Stokes 2010-06-02 14:23:08 UTC
You can set a temporary directory to store the captures files and also the compressed archive (--tmp-dir)

This should be available in latest sos release in RHEL6 beta.

Could you please confirm if this solves the issue?

Comment 3 Nikola Pajkovsky 2010-06-02 15:37:17 UTC
I've tried on rhel6 machine with this result. What's wrong?

[root@redhat ~]# mkdir sos
[root@redhat ~]# sosreport --tmp-dir sos/

sosreport (version 2.1)

This utility will collect some detailed  information about the
hardware and setup of your Red Hat Enterprise Linux system.
The information is collected and an archive is  packaged under
/tmp, which you can send to a support representative.
Red Hat Enterprise Linux will use this information for diagnostic purposes ONLY
and it will be considered confidential information.

This process may take a while to complete.
No changes will be made to your system.

Press ENTER to continue, or CTRL-C to quit.

Please enter your first initial and last name [redhat]: 
Please enter the case number that you are generating this report for: 

  Running plugins. Please wait ...

  Completed [52/52] ...      
Creating compressed archive...
/bin/sh: sos/sosreport-redhat-20100602173547.tar.xz: No such file or directory
/bin/tar: -: Cannot write: Broken pipe
/bin/tar: Error is not recoverable: exiting now
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 23, in <module>
  File "/usr/lib/python2.6/site-packages/sos/sosreport.py", line 835, in sosreport
  File "/usr/lib/python2.6/site-packages/sos/policyredhat.py", line 313, in displayResults
    fp = open(self.report_file, "r")
IOError: [Errno 2] No such file or directory: 'sos/sosreport-redhat-20100602173547.tar.xz'
[root@redhat ~]# ls -l sos/
total 0

Comment 4 Adam Stokes 2010-06-02 16:21:43 UTC
Does `pwd`/sos/ exist?


Comment 5 Denys Vlasenko 2010-06-02 16:58:01 UTC
Of course. "mkdir sos" created it, and "ls -l sos/" did not says that it doesn't exist.

Comment 6 Adam Stokes 2010-06-02 17:13:50 UTC
Thanks for the quick replies -- I'm able to reproduce so I'll see what I can do.


Comment 7 Adam Stokes 2010-06-03 18:17:47 UTC
I belive I've fixed this issue it should make its way into nightly as soon as I can get the cluster plugin wrapped up.


Comment 8 Denys Vlasenko 2010-06-08 12:00:20 UTC
Where we can get this build for testing?

Comment 9 Adam Stokes 2010-06-08 15:09:20 UTC
Hi Denys,

I have a scratch build up at 



Comment 10 Denys Vlasenko 2010-06-10 12:31:43 UTC
I tested it and it works for me, please push it to RHEL6 ASAP...

Comment 11 RHEL Product and Program Management 2010-06-10 14:08:27 UTC
This feature request did not get resolved in time for Feature Freeze
for the current Red Hat Enterprise Linux release and has now been
denied. It has been proposed for the next Red Hat Enterprise Linux
release. If you would still like it considered for the current
release as an exception, please make that request with your support

Comment 16 releng-rhel@redhat.com 2010-11-10 21:38:23 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.