Red Hat Bugzilla – Bug 1468730
--all-logs option does not limit sizes, despite man page and usage message
Last modified: 2017-08-16 13:06:44 EDT
Description of problem:
When running sosreport with --all-logs, the description is that file size limits
are not maintained, and that sosreports can get very large as a result. However,
a reading of the code and experimental runs show this to not be the case.
Version-Release number of selected component (if applicable):
Make a large logfile, and generate an sosreport that should include it. The
data is not included.
Steps to Reproduce:
[root@rhel6 tmp]# dd if=/dev/urandom of=/var/log/messages-big bs=1M count=20
20+0 records in
20+0 records out
20971520 bytes (21 MB) copied, 1.68827 s, 12.4 MB/s
[root@rhel6 tmp]# sosreport
[root@rhel6 tmp]# tar xf sosreport-rhel6.int.blisses.org-20170707123828.tar.xz
[root@rhel6 tmp]# cd sosreport-rhel6.int.blisses.org-20170707123828
[root@rhel6 sosreport-rhel6.int.blisses.org-20170707123828]# cd var/log/
[root@rhel6 log]# ls -lh messages*
-rw-------. 1 root root 165K Jul 7 12:35 messages
-rw-------. 1 root root 350K Jun 19 12:01 messages-20170619
-rw-------. 1 root root 98K Jun 25 03:12 messages-20170625
lrwxrwxrwx. 1 root root 50 Jul 7 12:38 messages-big ->
[root@rhel6 log]# ls -l ../../sos_strings/logs/var.log.messages-big.tailed
-rw-r--r--. 1 root root 0 Jul 7 12:38
[root@rhel6 log]# ls -l /var/log/messages-big
-rw-r--r--. 1 root root 20971520 Jul 7 12:38 /var/log/messages-big
".tailed" file generated, sans data.
Because of --all-logs, expected to see whole file, despite size.
It's just a documentation bug - see my reply in bug 1468728. You need to give --log-size=0 if you want to also disable log size limits.
As I understand it, the majority of our customers roll out RHEL 6 still as their
primary platform, and this is a fairly important tool for supporting them.
This is one of three bugs, and I'm hoping they're all corrected, so it might be
reasonable to correct this in a set of commits that includes the other fixes,
especially given that this is arguably related to 1468730, where such a commit
might have more impedance by itself.
The other bugs:
Ah, sorry, was confusing my bugs. I thought you were replying to the doc bug.
Re: comment 2, if this behaviour isn't to be changed, it's all the more important
that the docs be corrected then. Either way is fine with me, but this is a fairly
important tool that gets used a bunch.
> the description is that file size limits are not maintained
I can see how you could read that into it, but it's not actually what the man page says - it just says that reports may grow very large if this is used (they may).
We'll change the wording but again it's much easier to make minor changes like this upstream and in RHEL7.