Bug 977863 - --local-tmp option ignored, default value for --local-tmp ignored
--local-tmp option ignored, default value for --local-tmp ignored
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-log-collector (Show other bugs)
All Linux
low Severity low
: ---
: 3.3.0
Assigned To: Kiril Nesenko
sefi litmanovich
Depends On:
  Show dependency treegraph
Reported: 2013-06-25 09:38 EDT by Julio Entrena Perez
Modified: 2016-01-19 11:43 EST (History)
13 users (show)

See Also:
Fixed In Version: rhevm-log-collector-3.3.0-1.el6ev
Doc Type: Bug Fix
Doc Text:
The --local-tmp option should create a tarball in the specified directory, however the tarball was always created under /tmp. Now, the --local-tmp option behaves as expected, and generates a tarball in the specified directory.
Story Points: ---
Clone Of:
Last Closed: 2014-01-21 11:59:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 408113 None None None Never
oVirt gerrit 18781 None None None Never
oVirt gerrit 18822 None None None Never
Red Hat Product Errata RHBA-2014:0039 normal SHIPPED_LIVE rhevm-log-collector bug fix and enhancement update 2014-01-21 16:52:46 EST

  None (edit)
Description Julio Entrena Perez 2013-06-25 09:38:55 EDT
Description of problem:
rhevm-log-collector ignores both specified directory in "--local-tmp" option and default output directory documented in its man page:

man rhevm-log-collector

Local directory where reports are copied (default=/tmp/logcollector).
Output tarball file is created in /tmp.

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

How reproducible:

Steps to Reproduce:
1. Run "rhevm-log-collector" or "rhevm-log-collector --local-tmp=/tmp/logcollector".
2. Observe location for output tarball file.

Actual results:
# 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

Expected results:
INFO: Log files have been collected and placed in /tmp/logcollector/sosreport-LogCollector-20130625143213.tar.xz.

Additional info:
Comment 2 Sandro Bonazzola 2013-07-26 04:46:27 EDT

# 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.
Comment 3 akotov 2013-08-20 06:47:58 EDT
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
Comment 4 Keith Robertson 2013-08-20 10:12:50 EDT
(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.
Comment 5 Sandro Bonazzola 2013-08-21 03:03:05 EDT
(In reply to Keith Robertson from comment #4)

> Sandro is correct and I think his suggestion of '--output' makes the most
> sense.

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.
Comment 6 Sandro Bonazzola 2013-09-03 05:34:19 EDT
patch 18781 merged upstream master, needs to be backported to 3.3 branch
Comment 7 Sandro Bonazzola 2013-09-03 05:34:57 EDT
Add new --output option.
* Added --output option to store the LC report
* Update the man page accordingly
Comment 9 sefi litmanovich 2013-09-23 12:24:36 EDT
Verified on rhevm 3.3 , IS15
Comment 10 Charlie 2013-11-27 20:16:55 EST
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.
Comment 11 errata-xmlrpc 2014-01-21 11:59:43 EST
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.


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