Bug 1176477

Summary: Collect the output from "rhui-manager status" in sosreport
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: Peter Gervase <pgervase>
Component: ToolsAssignee: Martin Minar <mminar>
Status: CLOSED ERRATA QA Contact: Radek Bíba <rbiba>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0.4CC: bkearney, cduryee, mminar, tsanders
Target Milestone: 3.0.5   
Target Release: 3.0.x   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-05 17:04:27 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:
Bug Depends On: 1431538    
Bug Blocks:    
Attachments:
Description Flags
rhua-debug none

Description Peter Gervase 2014-12-22 04:13:05 UTC
Description of problem:
The rhui plugin for sosreport is nice (poorly documented, but nice. I didn't know about it until researching to write up an rfe for it), but
1) The gathered logs are hidden in the sos_commands sub folders rather than in etc, var, .. as appropriate

2) /var/log/httpd/* should be collected. While this might be a fairly large folder, it should compress decently and the logs are often needed.

3) rhui/rhui-debug-2014-12-21-T22-32-09/commands/ls_-lR_var.lib.pulp
that gets captures isn't really a command. Or at least, no more so than the other logs that are captured. It'd be nice if
# rhui-manager status
# rhui-manager cds clusters
were gathered, and those are actually commands that would be appropriate for a commands folder. 

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

How reproducible:
100%

Steps to Reproduce:
1. sosreport -e rhui
2.
3.

Actual results:
sosreport captured with above issues.

Expected results:
sosreport captured with above issues resolved.

Additional info:
Sort of related to 
https://bugzilla.redhat.com/show_bug.cgi?id=867803
but that looks to be discussing directly calling rhui-debug.py. This is for customers running just
# sosreport -e rhui
and that command should gather all logs needed for rhui issues without having to add other flags. Hence, collecting /var/log/httpd should be included in the sosreport when run with -e rhui. Currently, we ask customers to manually tar up /var/log/httpd and upload that.

Comment 3 Peter Gervase 2015-02-06 13:25:50 UTC
The /usr/share/rh-rhua/rhui-debug.py doesn't look like it does much. I wrote /usr/bin/rhua-debug based on the idea of spacewalk-debug.


[root@pmg-rhua ~]# time rhua-debug
Collecting and packaging relevant diagnostic information.
    * copying configuration information
Warning: this may take some time...
    * copying logs
    * collecting cert information
    * querying RPM database
    * get diskspace available
    * copying audit.log
    * timestamping
    * creating tarball (may take some time): /tmp/rhua-debug-20150206.tar.bz2
    * removing temporary debug tree

Debug dump created, stored in /tmp/rhua-debug-20150206.tar.bz2

real    0m29.087s
user    0m22.923s
sys     0m3.400s
[root@pmg-rhua ~]# ls /tmp
rhua-debug-20150206.tar.bz2

I tried running sosreport with the rhui plugin, 
[root@pmg-rhua tmp]# time sosreport -e rhui
...
real    1m45.050s
user    0m11.594s
sys     0m5.809s

# sosreport -o rhui isn't much better.

It's just a start, but I'll attach the script to here. This can probably be used on the cdses, too (rhui-debug then I guess).

Comment 4 Peter Gervase 2015-02-06 13:26:40 UTC
Created attachment 988856 [details]
rhua-debug

Comment 8 Radek Bíba 2018-06-29 09:06:32 UTC
This is almost done thanks to the patch in bug 1591027, the only thing that remains from comment 0 (and is still relevant in RHUI 3) is rhui-manager status. Let's add that in the next update.

Comment 14 errata-xmlrpc 2018-09-05 17:04:27 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.

https://access.redhat.com/errata/RHBA-2018:2649