Bug 2079188

Summary: sos report does not honor plugin's default plugin_timeout
Product: Red Hat Enterprise Linux 9 Reporter: Pavel Moravec <pmoravec>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Adriana Jurkechova <ajurkech>
Severity: high Docs Contact:
Priority: high    
Version: 9.1CC: agk, ajurkech, bmr, jwboyer, mhradile, plambri, sbradley, theute
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sos-4.3-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 11:12:29 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 Pavel Moravec 2022-04-27 07:32:03 UTC
This bug was initially created as a copy of Bug #2055547

I am copying this bug because: 

It will be fixed in 9.0 so to prevent regression, we need to backport the fix into 9.1 as well.

Description of problem:
Wired plugins' default_tieout is silently ignored. This means, default "sos report" will ignore foreman's default_timeout = 1800 and will use default --plugin-timeout default value 300. Which would often truncate the plugin's execution in the middle.

https://github.com/sosreport/sos/pull/2864 needs to be backported to 8.6/9.0


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


How reproducible:
100%


Steps to Reproduce:
1. sos report -o foreman --batch --build
2. In generated sosreport:

grep -A10 foreman -m2 ${sosdir}/sos_reports/manifest.json


Actual results:
2. shows:
..
--
                "foreman": {
                    ..
                    "timeout": 300, 
                    ..


Expected results:
2. must show:
..
--
                "foreman": {
                    ..
                    "timeout": 1800, 
                    ..

Additional info:

Comment 2 Pavel Moravec 2022-06-16 10:19:43 UTC
*** Bug 2097675 has been marked as a duplicate of this bug. ***

Comment 3 Adriana Jurkechova 2022-07-08 11:32:49 UTC
Switching to Tested based on results from OSCI dashboard. Tested on RHEL 9.1 Beta x86_64.

Old:
===

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 09:07:10 ] :: [   INFO   ] :: rlImport: Found 'sos/utils', version '1.0-18' in /mnt/tests
:: [ 09:07:10 ] :: [   INFO   ] :: rlImport: Will try to import sos/utils from /mnt/tests/CoreOS/sos/Library/utils/lib.sh
:: [ 09:07:10 ] :: [   INFO   ] :: found dependencies: ''
:: [ 09:07:10 ] :: [   PASS   ] :: sos/utils library loaded, variables defined (Expected 0, got 0)
:: [ 09:07:11 ] :: [   PASS   ] :: Checking for the presence of sos rpm 
:: [ 09:07:11 ] :: [   LOG    ] :: Package versions:
:: [ 09:07:11 ] :: [   LOG    ] ::   sos-4.3-1.el9.noarch

...

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 09:07:11 ] :: [   INFO   ] :: Running sos report and test if default plugin timeout is used:
:: [ 09:07:14 ] :: [   PASS   ] :: sosReport: generating new report (Expected 0, got 0)
:: [ 09:07:14 ] :: [   PASS   ] :: sosReport: listing generated report (Expected 0, got 0)
:: [ 09:07:14 ] :: [   PASS   ] :: sosAssertFileIncluded 'sos_reports/manifest.json' (Expected 0, got 0)
:: [ 09:07:14 ] :: [   PASS   ] :: Unpacking sosreport (Expected 0, got 0)
:: [ 09:07:14 ] :: [   FAIL   ] :: Plugin default timeout is used (Assert: '300' should equal '1800')
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 3s
::   Assertions: 4 good, 1 bad
::   RESULT: FAIL (Test)

New:
===
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 07:20:28 ] :: [   INFO   ] :: rlImport: Found 'sos/utils', version '1.0-18' in /mnt/tests
:: [ 07:20:28 ] :: [   INFO   ] :: rlImport: Will try to import sos/utils from /mnt/tests/CoreOS/sos/Library/utils/lib.sh
:: [ 07:20:28 ] :: [   INFO   ] :: found dependencies: ''
:: [ 07:20:28 ] :: [   PASS   ] :: sos/utils library loaded, variables defined (Expected 0, got 0)
:: [ 07:20:28 ] :: [   PASS   ] :: Checking for the presence of sos rpm 
:: [ 07:20:28 ] :: [   LOG    ] :: Package versions:
:: [ 07:20:28 ] :: [   LOG    ] ::   sos-4.3-2.el9.noarch

...

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 07:20:29 ] :: [   INFO   ] :: Running sos report and test if default plugin timeout is used:
:: [ 07:20:32 ] :: [   PASS   ] :: sosReport: generating new report (Expected 0, got 0)
:: [ 07:20:32 ] :: [   PASS   ] :: sosReport: listing generated report (Expected 0, got 0)
:: [ 07:20:32 ] :: [   PASS   ] :: sosAssertFileIncluded 'sos_reports/manifest.json' (Expected 0, got 0)
:: [ 07:20:32 ] :: [   PASS   ] :: Unpacking sosreport (Expected 0, got 0)
:: [ 07:20:32 ] :: [   PASS   ] :: Plugin default timeout is used (Assert: '1800' should equal '1800')
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 3s
::   Assertions: 5 good, 0 bad
::   RESULT: PASS (Test)

Comment 8 errata-xmlrpc 2022-11-15 11:12:29 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 (sos bug fix and enhancement update), 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/RHEA-2022:8275