Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1596496 - Change the detection of CDS for RHUI 3
Summary: Change the detection of CDS for RHUI 3
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sos
Version: 6.10
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Filip Krska
QA Contact: BaseOS QE - Apps
Jiri Hornicek
Depends On: 1614954 1596296 1596494
TreeView+ depends on / blocked
Reported: 2018-06-29 06:58 UTC by Radek Bíba
Modified: 2018-08-14 21:50 UTC (History)
11 users (show)

Fixed In Version: sos-3.2-63.el6_10.2
Doc Type: Bug Fix
Doc Text:
Cause: sosreport did not detect CDS nodes in RHUI3 Consequence: rhui-debug script was improperly called and did not collect proper RHUI debug data Fix: sosreport properly detects CDS node also by checking if rhui-mirrorlist package is present Result: rhui-debug properly collects RHUI3 data from a CDS node
Clone Of: 1596494
Last Closed: 2018-08-14 21:50:16 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2406 None None None 2018-08-14 21:50:25 UTC

Description Radek Bíba 2018-06-29 06:58:32 UTC
RHEL 6 is also affected.

+++ This bug was initially created as a clone of Bug #1596494 +++

Description of problem:
The RHUI plug-in for sos reads:

    rhui_debug_path = "/usr/share/rh-rhua/"
        if self.is_installed("pulp-cds"):
            cds = "--cds"
            cds = ""

        rhui_debug_dst_path = self.get_cmd_output_path()
            "python %s %s --dir %s"
            % (self.rhui_debug_path, cds, rhui_debug_dst_path),

The way the script decides whether it's running on a CDS node (as opposed to a RHUA node) worked on RHUI 2, where pulp-cds was indeed a valid package name, but  on RHUI 3 there's no such package. Consequently, the rhui-debug script is executed without --cds and doesn't collect the right config and log files that are present on a CDS node. In fact, no useful data is collected as the files that are collected in the "non-CDS" mode only exist on RHUA nodes.

RHUI 2 is no longer supported (see for the schedule), so it should be safe to change the detection in a way that's not backward compatible with RHUI 2. As for how the detection should be made, there isn't any package specific to CDS nodes, but perhaps you could check if the /etc/httpd/conf.d/03-crane.conf file exists, as it only exists on CDSes. So the implementation could be as follows:

import os
        if os.path.isfile("/etc/httpd/conf.d/03-crane.conf"):
            cds = "--cds"
            cds = ""

I've checked this and it works well.

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

How reproducible:

Steps to Reproduce:
1. install sos on a RHUI CDS node
2. until bug 1596296 is fixed, manually create /usr/share/rh-rhua/
3. run sosreport -o rhui

Actual results:
The tarball doesn't contain anything useful

Expected results:
The tarball contains CDS-specific files, for example:

Comment 7 Jiri Hornicek 2018-08-02 07:26:41 UTC
Hi Filip,

can you provide the Doc Text for this BZ, please?

Comment 8 Pavel Moravec 2018-08-02 08:24:49 UTC
(In reply to Jiri Hornicek from comment #7)
> Hi Filip,
> can you provide the Doc Text for this BZ, please?

Done (deputizing Filip on vacation).

Comment 10 errata-xmlrpc 2018-08-14 21:50:16 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.

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