Bug 1468730 - --all-logs option does not limit sizes, despite man page and usage message
--all-logs option does not limit sizes, despite man page and usage message
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sos (Show other bugs)
6.8
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Shane Bradley
BaseOS QE - Apps
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-07 14:46 EDT by Mason Loring Bliss
Modified: 2017-08-16 13:06 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-16 13:06:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mason Loring Bliss 2017-07-07 14:46:47 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):

sos-3.2-15.el7.noarch

How reproducible:

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 ->
../../sos_strings/logs/var.log.messages-big.tailed
[root@rhel6 log]# ls -l ../../sos_strings/logs/var.log.messages-big.tailed
-rw-r--r--. 1 root root 0 Jul  7 12:38
../../sos_strings/logs/var.log.messages-big.tailed
[root@rhel6 log]# ls -l /var/log/messages-big
-rw-r--r--. 1 root root 20971520 Jul  7 12:38 /var/log/messages-big

Actual results:

".tailed" file generated, sans data.

Expected results:

Because of --all-logs, expected to see whole file, despite size.

Additional info:
Comment 2 Bryn M. Reeves 2017-07-07 15:32:42 EDT
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.
Comment 3 Mason Loring Bliss 2017-07-07 15:36:51 EDT
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:

    1468730
    1468736
Comment 4 Mason Loring Bliss 2017-07-07 15:38:04 EDT
Ah, sorry, was confusing my bugs. I thought you were replying to the doc bug.
Comment 5 Mason Loring Bliss 2017-07-07 15:39:14 EDT
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.
Comment 6 Bryn M. Reeves 2017-07-07 15:44:06 EDT
> 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.

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