Bug 716987 - Relative symlink in created report for truncated log files is wrong
Summary: Relative symlink in created report for truncated log files is wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.7
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Bryn M. Reeves
QA Contact: David Kutálek
URL:
Whiteboard:
Depends On:
Blocks: 769266
TreeView+ depends on / blocked
 
Reported: 2011-06-27 16:45 UTC by David Kutálek
Modified: 2018-11-14 19:46 UTC (History)
5 users (show)

Fixed In Version: sos-1.7-9.59.el5
Doc Type: Bug Fix
Doc Text:
Cause: The sosreport command allows the user to restrict the maximum size of log files collected by the general plugin. If the limit is exceeded a portion of the log file (up to the specified limit) is stored in the report in the plugin commands directory. Consequence: Prior versions did not create a symbolic link from the default location for the size-limited log file to the location in the plugin commands directory. If a user was unaware that log size limiting was in effect they may incorrectly think that the file is missing. Fix: With this release sosreport will create symbolic links that point from the default location to the size-limited log file Result: Users can now find the expected content at the default location within the sosreport regardless of the use of log file size limits.
Clone Of:
Environment:
Last Closed: 2012-02-21 03:25:12 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0153 0 normal SHIPPED_LIVE Low: sos security, bug fix, and enhancement update 2012-02-21 07:25:08 UTC

Description David Kutálek 2011-06-27 16:45:17 UTC
Description of problem:

Bug 636472 was fixed by storing tail of first logfile into $sosreport/sos_commands directory. Customer requested also link to be created in $sosreport/var/log directory to point to this tailed log. Link is created, but is pointing to wrong direction.

This is probably caused by fact that method used to create link assumes it is link in root of report directory - in sources named as root_symlink.

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

sos-1.7-9.54.el5

How reproducible:

Always

Steps to Reproduce:
1. fill /var/log/messages with some logs eg. by logger to have size >1MB
2. run sosreport -o general -k general.syslogsize=1 
3. inspect created report and look for var/log/messages.tailed symlink
  
Actual results:

points to sos_commands/general/tail_messages

Expected results:

should point to ../../sos_commands/general/tail_messages

Additional info:

Probably wrong usage of root_symlink, ie creating symlink outside report root dir.

Comment 1 Bryn M. Reeves 2011-08-16 13:15:05 UTC
The attempt to add a symlink for this file was a rather mistaken effort - it abuses the root_symlink parameter and although there was an attempt in the patch sent upstream to account for this in my testing that change broke other symlinks in the tree and for that reason I dropped that hunk from the patch that went into RHEL6.

If we're going to handle this properly it probably needs a new method explicitly designed to allow adding arbitrary syminks to the tarball.

Comment 6 Bryn M. Reeves 2012-01-25 16:48:06 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: The sosreport command allows the user to restrict the maximum size of log
files collected by the general plugin. If the limit is exceeded a portion of
the log file (up to the specified limit) is stored in the report in the plugin
commands directory.

Consequence: Prior versions did not create a symbolic link from the default location for
the size-limited log file to the location in the plugin commands directory. If
a user was unaware that log size limiting was in effect they may incorrectly
think that the file is missing.

Fix: With this release sosreport will create symbolic links that point from the
default location to the size-limited log file

Result: Users can now find the expected content at the default location within the
sosreport regardless of the use of log file size limits.

Comment 7 errata-xmlrpc 2012-02-21 03:25:12 UTC
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.

http://rhn.redhat.com/errata/RHSA-2012-0153.html


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