Created attachment 998388 [details] ovirt-log-collector-20150305151518.log Description of problem: current --local-tmp functionality is dump, it will always remove the directory! wow! i suppose most people would think --local-tmp works as mktemp's tmpdir option, specifying parent dir where temporary dir is created. if they do this assumption then they can end with deleted /root or whatever :D so make it behave clever, --local-tmp should be parent of temporary garbage files/dirs. -bash-4.1# engine-log-collector --local-tmp=/root --no-postgresql --no-hypervisors This command will collect system configuration and diagnostic information from this system. The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party. No changes will be made to system configuration. INFO: Gathering oVirt Engine information... INFO: Skipping postgresql collection... INFO: Skipping hypervisor collection... Creating compressed archive... INFO: Log files have been collected and placed in /tmp/sosreport-LogCollector-20150305151612.tar.xz. The MD5 for this file is b6557e1174962d225f9df1d00d9915c8 and its size is 273.7M -bash-4.1# ls -ld /root ls: cannot access /root: No such file or directory -bash-4.1# cd / -bash-4.1# ls -ld /root* drwxr-xr-x. 8 root root 4096 Mar 5 14:12 /root.bkp Version-Release number of selected component (if applicable): rhevm-log-collector-3.5.1-1.el6ev.noarch How reproducible: 100% Steps to Reproduce: 1. engine-log-collector --local-tmp=/root --no-postgresql --no-hypervisors (AND HAVE FUN LATER!) 2. 3. Actual results: --local-tmp option is dump and insecure and confusing (somehow) Expected results: --local-tmp should be a "parent" destination for temporary files/dirs Additional info: well well, nitpicking... i would expect final sos* file would be (if this BZ is accepted) found under --local-tmp and not always in /tmp (even if sos* file has 600)
I think that it's already fixed in the latest version (Note commit 18f9aac522e1f6e43015c6869d3360f9c38b16b7 by Sandro Bonazzola).
please provide at lest rpm filename, we don't build anything from git. also engine-log-collector is liar... # engine-log-collector --help | sed -n '/local-tmp=/,/logcollector-/p' --local-tmp=PATH directory to copy reports to locally. Please note that the local-tmp directory is used only for storing temporary reports gathered from hypervisors.(default is randomly generated like: /tmp/logcollector-UCy6Kh) see 'user only', that's not true :) check with '--no-hypervisors' and you will see files appearing in tmp dir.
Tried with: rhevm-log-collector-3.6.0-1.el6ev.noarch local-tmp parent is still been removed.
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.
Please note that this bug was already discussed in the past and rejected: https://bugzilla.redhat.com/show_bug.cgi?id=977863#c4 Perhaps instead of existing bug/change, we can just make sure that if the supplied local tmp exists, that it's empty.
We are going to fix the deletion of tmp dir at the end of collection. This should close the gap and I see no reason to do this. Closing.
(In reply to Yaniv Dary from comment #8) > We are going to fix the deletion of tmp dir at the end of collection. Is there a different bug for that? > This > should close the gap and I see no reason to do this. Closing.
(In reply to Yedidyah Bar David from comment #9) > (In reply to Yaniv Dary from comment #8) > > We are going to fix the deletion of tmp dir at the end of collection. > > Is there a different bug for that? BZ #1288197 > > > This > > should close the gap and I see no reason to do this. Closing.