Bug 1304386 - [RFE] Give to user option selective collection logs via sosreport
[RFE] Give to user option selective collection logs via sosreport
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos (Show other bugs)
7.4
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Pavel Moravec
BaseOS QE - Apps
: FutureFeature, Reopened
Depends On:
Blocks: 973539
  Show dependency treegraph
 
Reported: 2016-02-03 08:17 EST by Yaniv Lavi (Dary)
Modified: 2016-02-05 07:51 EST (History)
20 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 973539
Environment:
Last Closed: 2016-02-05 01:44:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yaniv Lavi (Dary) 2016-02-03 08:17:05 EST
+++ This bug was initially created as a clone of Bug #973539 +++

Description of problem: 
Give to user option selective collection logs via sosreport. We want to allow RHEV users to select which logs to collect to make the collection take less time and have a smaller result.

How reproducible:
100%

Steps to Reproduce:
1. run sosreport tool

Example from real life:
I have RHEVM environment with 50 hosts installed there.
After I found some bug in my environment, and I had to collect logs and attached them to Bugzilla. 
I used with ovirt-log-collector tool for collect my logs that run sosreport.
After 1.5 hour I got zipped file with 3.56 GB size.
  
Actual results:
1. Impossible attached this file to Bugzilla
2. Not all logs are relevant

Expected results:
For example: 
Give to user options collect from host only “vdsm.log” and “libvirtd.log” logs.
Comment 2 Bryn M. Reeves 2016-02-03 08:48:56 EST
The sos package in RHEL7 does not collect vdsm.log (this is probably collected by the vdsm plugin in the vdsm package shipped with RHEV).

> Give to user options collect from host only “vdsm.log” and “libvirtd.log” logs.

Don't enable the 'vdsm', 'logs', or 'libvirt' plugins as appropriate:

 # sosreport -n logs

 # sosreport -n vdsm

 # sosreport -n libvirt,logs,vdsm

Or whatever combination you want.

Otherwise you can set a global size limit for individual logs that's small enough to only collect the data you want (files exceeding the limit are tailed in the report).

All of these are years old options described in the manual page. We can add more sophisticated controls if needed but it looks like you just need to use the existing capabilities for now.
Comment 3 Yaniv Lavi (Dary) 2016-02-03 09:25:48 EST
Can you please provide input on comment #2? Will these option allow us to complete bug 973539?
Comment 4 Sandro Bonazzola 2016-02-05 01:44:58 EST
(In reply to Bryn M. Reeves from comment #2)
> The sos package in RHEL7 does not collect vdsm.log (this is probably
> collected by the vdsm plugin in the vdsm package shipped with RHEV).

yes, vdsm is shipping a sos plugin within its code. I opened bug #1168500 asking to have it moved from vdsm to sos 2 years ago.


> > Give to user options collect from host only “vdsm.log” and “libvirtd.log” logs.
> 
> Don't enable the 'vdsm', 'logs', or 'libvirt' plugins as appropriate:
> 
>  # sosreport -n logs
> 
>  # sosreport -n vdsm
> 
>  # sosreport -n libvirt,logs,vdsm
> 
> Or whatever combination you want.

I think you meant the opposite, collect only vdsm.log and libvirt.log so
on EL7: sosreport -o libvirt,vdsm


> Otherwise you can set a global size limit for individual logs that's small
> enough to only collect the data you want (files exceeding the limit are
> tailed in the report).
> 
> All of these are years old options described in the manual page. We can add
> more sophisticated controls if needed but it looks like you just need to use
> the existing capabilities for now.

I agree, we can close this as not a bug.
Comment 5 Bryn M. Reeves 2016-02-05 07:51:22 EST
> I think you meant the opposite, collect only vdsm.log and libvirt.log so
> on EL7: sosreport -o libvirt,vdsm

No, I think I meant what I wrote. The -n option selectively disables plugins, the -o option selectively enables them.

Depending on the outcome you want you can use either (afaik the logCollector script is already using -o to specify a hard-coded list of plugins so you can either remove entries from the list or override them with -n - whichever is most convenient for the existing structure).

Of course, using profiles (--profile=prof1,prof2,...) and the global --log-size option is the preferred method today - we'd have no objection to maintaining a profile for RHEV and oVirt's use upstream that selects just the required plugins and gets rid of the need to maintain plugin lists in another component (which already has broken several times).

Anyway, agreed: NOTABUG.

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