Red Hat Bugzilla – Bug 977863
--local-tmp option ignored, default value for --local-tmp ignored
Last modified: 2016-01-19 11:43:28 EST
Description of problem:
rhevm-log-collector ignores both specified directory in "--local-tmp" option and default output directory documented in its man page:
Local directory where reports are copied (default=/tmp/logcollector).
Output tarball file is created in /tmp.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run "rhevm-log-collector" or "rhevm-log-collector --local-tmp=/tmp/logcollector".
2. Observe location for output tarball file.
# rhevm-log-collector --local-tmp=/tmp/logcollector
INFO: /tmp/logcollector does not exist. It will be created. <-----
Creating compressed archive...
INFO: Log files have been collected and placed in /tmp/sosreport-LogCollector-20130625143213.tar.xz.
The MD5 for this file is 67d5fc7b0f2cd1fef083bdbfe1c92dbe and its size is 4.3M
INFO: Log files have been collected and placed in /tmp/logcollector/sosreport-LogCollector-20130625143213.tar.xz.
# rhevm-log-collector --help
--local-tmp=PATH directory to copy reports to locally (default is
randomly generated like: /tmp/logcollector-KmyQ5Z)
the man page is outdated.
Please note that the local-tmp directory is used only for storing temporary reports gathered from hypervisors.
The final output report is always stored in $TMPDIR
We can add a --output flag for telling where to store the final report or
force the output in the same directory used for gathering tmp reports.
As workaround TMPDIR can be set in env with the desired path.
Pretty dangerous outdated man page, because --local-tmp gets deleted after command is finished, therefore customers could lose other log data in their designated logoutput directory
(In reply to akotov from comment #3)
> Pretty dangerous outdated man page, because --local-tmp gets deleted after
> command is finished, therefore customers could lose other log data in their
> designated logoutput directory
Sandro is correct and I think his suggestion of '--output' makes the most sense.
I do not agree with the sentiment that it is 'dangerous'. The local-tmp was never intended to be the place from which a customer would look for the resulting SoS archive; hence, 'tmp'. It is simply a place where the LC can collate, on disk, everything that it is preparing to compress into an uber SoS report. A staging area if you will.
(In reply to Keith Robertson from comment #4)
> Sandro is correct and I think his suggestion of '--output' makes the most
I'll fix this adding --output and updating man page and --help.
I've a few bugs with higher priority but I'll try to fix this soon as well, since we've 3 customer portal reference on this bug.
patch 18781 merged upstream master, needs to be backported to 3.3 branch
Add new --output option.
* Added --output option to store the LC report
* Update the man page accordingly
Verified on rhevm 3.3 , IS15
This bug is currently attached to errata RHBA-2013:15255. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.
Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:
* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')
Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.
For further details on the Cause, Consequence, Fix, Result format please refer to:
Thanks in advance.
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.