Bug 1368479

Summary: sosreport timeout does not allow for a full capture of foreman-debug output for Satellite 6 systems
Product: Red Hat Enterprise Linux 7 Reporter: Craig Donnelly <cdonnell>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Miroslav Hradílek <mhradile>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: agk, aperotti, bmr, cdonnell, daniele, gavin, isenfeld, juwu, mhradile, plambri, sbradley
Target Milestone: rcKeywords: OtherQA
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/sosreport/sos/pull/888
Whiteboard:
Fixed In Version: sos-3.4-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 23:08:12 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:    
Bug Blocks: 1353215    

Description Craig Donnelly 2016-08-19 14:06:52 UTC
Description of problem:
Running a sosreport will collect a 'foreman-debug' from a Satellite 6 based system, however this instance of foreman-debug will not be a complete capture, as sosreport has a timeout against modules that run in sosreport during the run.

Version-Release number of selected component (if applicable):
sos-3.2-35.el7_2.3.noarch

How reproducible:
100%

Steps to Reproduce:
1. Run 'sosreport' on Satellite 6 system.
2. Run 'foreman-debug' on Satellite 6 system.
3. Compare foreman-debug contents to sosreport at sosreport/sos_commands/foreman/foreman-debug*

Actual results:
foreman-debug that is included in sosreport is missing large swath of information compared to a plain 'foreman-debug' capture.

Expected results:
foreman-debug from sosreport should be allowed to complete and have identical information to normal foreman-debug.

Additional info:
This issue causes us to always have to request a sosreport & foreman-debug from every customer, and we are partially wasting time and duplicating information that customers even sometimes fight us on, as they know their sosreport captured one. This puts us in the position of explaining the reason for needing the separate capture.

This applies to RHEL 6 && 7 sos.

Comment 2 Pavel Moravec 2016-08-19 16:46:11 UTC
How much time it takes to generate full f-d and full sosreport (that calls also f-d)?

Does sosreport print it timeouted on some command?

Can you attach some f-d and sosreport tarballs as example?

FYI sosreport calls "foreman-debug -g" to skip collecting some generic information that sosreport collects by itself - that prevents collecting some info twice.

Comment 3 Pavel Moravec 2016-10-31 11:12:18 UTC
Decided to fix the generic "foreman-debug run takes longer than 5minutes timeout of sosreport" just by increasing the timeout to 15 minutes.

Upstream PR: https://github.com/sosreport/sos/pull/888

Comment 4 Pavel Moravec 2017-02-19 11:59:17 UTC
POSTED to upstream.

See also:

https://github.com/Katello/katello-packaging/pull/329

where we aim to significantly improve the lengthest call of foreman-debug: task export.

Comment 5 Pavel Moravec 2017-02-19 13:46:28 UTC
For QE:

in case deeper verification than "yes, the parameter is changed in code" is preferred from your side, I can help with either installing Satellite, mocking test, or preparing environment for a real test.

Comment 6 Pavel Moravec 2017-02-19 14:29:38 UTC
(In reply to Pavel Moravec from comment #5)
> For QE:
> 
> in case deeper verification than "yes, the parameter is changed in code" is
> preferred from your side, I can help with either installing Satellite,
> mocking test, or preparing environment for a real test.

Hello,
would you be able to verify the fix on a candidate RPM for RHEL7.4 (once available)?

Our QE would appreciate it.

Comment 12 Miroslav Hradílek 2017-05-24 14:15:03 UTC
I can confirm the change in plugin source. If there is no positive feedback from the customer I will verify this SanityOnly.

# diff -u old/BUILD/sos-3.3/sos/plugins/foreman.py /usr/lib/python2.7/site-packages/sos/plugins/foreman.py
--- old/BUILD/sos-3.3/sos/plugins/foreman.py	2016-06-29 20:24:47.000000000 +0200
+++ /usr/lib/python2.7/site-packages/sos/plugins/foreman.py	2017-05-22 22:40:13.000000000 +0200
@@ -30,6 +30,6 @@
 
         path = self.get_cmd_output_path(name="foreman-debug")
         self.add_cmd_output("%s -g -q -a -d %s" % (cmd, path),
-                            chroot=self.tmp_in_sysroot())
+                            chroot=self.tmp_in_sysroot(), timeout=900)
 
 # vim: set et ts=4 sw=4 :
# rpm -qf /usr/lib/python2.7/site-packages/sos/plugins/foreman.py
sos-3.4-4.el7.noarch

Comment 13 Miroslav Hradílek 2017-06-15 11:03:34 UTC
Verifying Sanity Only (based just on code). See comment 12.

Comment 14 errata-xmlrpc 2017-08-01 23:08: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.

https://access.redhat.com/errata/RHBA-2017:2203