Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1767025

Summary: Improve 01_dmesg_check result reporting
Product: [Retired] Restraint Reporter: Jakub Heger <jheger>
Component: generalAssignee: Carol Bouchard <cbouchar>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: asavkov, azelinka, bpeck, breilly, cbeer, cbouchar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 18:37:20 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 Jakub Heger 2019-10-30 14:16:09 UTC
Description of problem:
Recent bug in restraint caused false negatives in 01_dmesg_check. While the issue was solved quickly it showed that that results from the plugin leave much to be desired in clarity why the task failed.
Would it be possible to make the cause of failure clearer?

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


How reproducible:


Steps to Reproduce:
1. fail 01_dmesg_check
2.
3.

Actual results:
http://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2019/10/38657/3865751/7515917/101390914/466944855/resultoutputfile.log
http://beaker-archive.host.prod.eng.bos.redhat.com/beaker-logs/2019/10/38667/3866729/7517384/101424037/467089294/resultoutputfile.log

Expected results:
Clearly mark cause of failure.

Additional info:

Comment 1 Carol Bouchard 2019-10-30 14:51:54 UTC
I believe I've covered this work when I developed a fix for bz1741074. Let me know
if there is anymore needed. I think marking each line where the failure is would
be difficult to read.  Instead, I've added some reporting at the end of the resultoutputfile.log
for TR /01_dmesg_check.
Look at what's inbetween ==== at the end.
There are 3 DMESG selectors. You can configure by use of environment variables, or by files, or
default selectors.  Order of precedence is as I've listed them.  Most of the coding for BZ1741074
was this debug output.  The fix for BZ1741074 was actually very simple.

1) In this case environment variables are not configured and files are present
   and it shows what's in the files.
[   44.843991] Ginger
====================================================
DMESG Selectors:
Used failurestrings file and falsestrings file
====================================================
FAILURESTRINGS: Cuddles|Peanut|Ginger
FailureStrings file found and contains:
Cuddles
Peanut
Ginger
====================================================
FALSESTRINGS: DEBUG|boohoo
FalseStrings file found and contains:
DEBUG
boohoo
====================================================

2) In this case, both environment vars are set AND files are set.
   Environment variables take precedence.  Still show content of
   files in case someone is trying to make that work.  It reveals
   what the software see and what it used as dmesg selector.
   User can make corrections by removing environment variables.
[   62.963319] My Feet Hurt
====================================================
DMESG Selectors:
Used FAILURESTRINGS Environment Variable and FALSESTRINGS Environment Variable
====================================================
FAILURESTRINGS: My Feet Hurt|blahblah
FailureStrings file found and contains:
Cuddles
Peanut
Ginger
====================================================
FALSESTRINGS: Bubba|Cookies
FalseStrings file found and contains:
DEBUG
boohoo
====================================================

3) In this case, it shows default values are used.  It also shows the
files were found but ignored cause they were empty.  This is what
caused bz1741074 since a script erroneous created the files without content.
[   99.150937] Oops
====================================================
DMESG Selectors:
Used Default FAILURESTRINGS and Default FALSESTRINGS
====================================================
FAILURESTRINGS: Oops|BUG|NMI appears to be stuck|Badness at
FailureStrings file found but empty.
====================================================
FALSESTRINGS: BIOS BUG|DEBUG|mapping multiple BARs.*IBM System X3250 M4
FalseStrings file found but empty.
====================================================

Comment 3 Carol Bouchard 2019-11-05 18:32:03 UTC
I'm going to duplicate this BZ to BZ1751074 and if this tool lets me also duplicate to BZ1746515.

Comment 4 Carol Bouchard 2019-11-05 18:36:26 UTC
Correction to previous comment. Would like to duplicate to BZ1751074 & BZ1756515.

Comment 5 Carol Bouchard 2019-11-05 18:37:20 UTC

*** This bug has been marked as a duplicate of bug 1751074 ***