Bug 976386

Summary: Add foreman-debug for RH Satellite 6
Product: Red Hat Enterprise Linux 6 Reporter: Dominic Cleal <dcleal>
Component: sosAssignee: Bryn M. Reeves <bmr>
Status: CLOSED ERRATA QA Contact: Filip Holec <fholec>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: agk, bmr, dcleal, fholec, gavin, psplicha, sos-team, xdmoon
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Documentation not needed.
Story Points: ---
Clone Of:
: 1130273 (view as bug list) Environment:
Last Closed: 2013-11-21 22:39:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dominic Cleal 2013-06-20 13:18:38 UTC
Description of problem:
RH Satellite 6 and RH OpenStack 3 both ship Foreman 1.2 (http://theforeman.org), which contains a foreman-debug command to collect debug data.  This should be added to sosreports.

foreman-debug is installed to /usr/sbin/foreman-debug in the "foreman" RPM and it supports these args, which would be useful for sosreport:
  -d DIR  Directory to place the tarball in (default /tmp/foreman-XYZ)
  -g      Skip generic info (CPU, memory, firewall etc.)
  -a      Do not generate a tarball from the resulting directory

See the script here: https://github.com/theforeman/foreman/blob/develop/script/foreman-debug

There are a couple of related problems in this area, since sos's CloudForms plugin is out of date with how products have changed:

1. Katello is now part of RH Satellite 6, not CloudForms
2. I'm unsure if Aeolus is shipped in any product now
3. CloudForms is now based on ManageIQ (don't know what debug this has. if any)

It might be more reliable to name the plugins after the individual projects instead of the products they're currently in.

Version-Release number of selected component (if applicable):
sos-2.2-38.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. `sosreport --build`
2. cd to build directory
3. `ls -l foreman-debug`

Actual results:
no such file

Expected results:
# ll foreman-debug/
total 48
-rw-r--r--. 1 root root  122 Jun 20 13:15 bundle_list
drwxr-xr-x. 8 root root 4096 Jun 20 13:15 etc
-rw-r--r--. 1 root root 2807 Jun 20 13:15 facts
-rw-r--r--. 1 root root  117 Jun 20 13:15 foreman_settings_table
-rw-r--r--. 1 root root  188 Jun 20 13:15 gem_list
-rw-r--r--. 1 root root  108 Jun 20 13:15 puppet_manifests_tree
-rw-r--r--. 1 root root  597 Jun 20 13:15 tftpboot_tree
drwxr-xr-x. 3 root root 4096 Jun 20 13:15 usr
drwxr-xr-x. 4 root root 4096 Jun 20 13:15 var
-rw-r--r--. 1 root root   34 Jun 20 13:15 version_puppet
-rw-r--r--. 1 root root   79 Jun 20 13:15 version_ruby
-rw-r--r--. 1 root root   80 Jun 20 13:15 virsh_list

Additional info:

Comment 2 Bryn M. Reeves 2013-07-25 12:55:15 UTC
1. Katello is now part of RH Satellite 6, not CloudForms
2. I'm unsure if Aeolus is shipped in any product now
3. CloudForms is now based on ManageIQ (don't know what debug this has. if any)

All of this stuff was added to sos last year at the behest of the relevant teams. We need to be kept informed if needs are changing - in particular since these things have been "out there" in RHEL we can't now remove them as some users will not apply all updates.

> It might be more reliable to name the plugins after the individual projects 
> instead of the products they're currently in.

This is our policy upstream and what I thought we were doing (I thought 'aeolus' and 'katello' where the project names..).

Comment 3 Bryn M. Reeves 2013-07-25 12:58:00 UTC
My inclination is to create a new 'foreman' plug-in that triggers on the presence of that named package.

Foreman content will appear at:

sos_commands/foreman/foreman-debug

Seem OK? I'll devel_ack this if so.

Comment 4 Dominic Cleal 2013-07-25 13:07:06 UTC
Sounds perfect, thanks.

Comment 5 Bryn M. Reeves 2013-08-13 18:20:27 UTC
commit fe1109ac40760989649ea88fdad1b38319e7356c
Author: Bryn M. Reeves <bmr>
Date:   Tue Aug 13 19:19:38 2013 +0100

    Add new foreman plug-in
    
    The foreman component includes a foreman-debug script. Add a new
    plug-in to call it and save the content in the generated report.
    
    Signed-off-by: Bryn M. Reeves <bmr>

Comment 9 errata-xmlrpc 2013-11-21 22:39:40 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/RHBA-2013-1688.html