Open marcelmamula opened 11 months ago
In my experience, 50 lines of SWPM error output is not enough to see where the error originated. At minimum I use tail -n 200
when doing this manually (which should not be close to wiping scrollback), although sometimes the whole log is needed to debug the failure.
I'm OK with the proposed change if 200 lines is used.
@marcelmamula Are you OK with 200 lines of output? I will then implement and test it.
@berndfinger @marcelmamula @sean-freeman another option would be to suppress non error messages. See example
how to use parameter SAPINST_MESSAGE_CONSOLE_THRESHOLD
And here is default parameter value https://github.com/redhat-sap/rh_operations/blob/4f2584de0651b58e4f99003e6bc0108ca4b71888/roles/sapinst/defaults/main.yml#L26
One can get list of supported parameters for sapinst with
./sapinst -p
Also for your information https://help.sap.com/docs/SUPPORT_CONTENT/sl/3362916813.html
Current failed check will dump huge amount of information directly from sapinst log files. This is amount that is not required for investigation of failure and we need to filter it out a bit. My test runs produced so many lines of output that it cleared my whole console, rendering actual ansible log useless, being replaced by part of sapinst log.
@sean-freeman @berndfinger Updated as I am currently testing sap_infrastructure and my SWPM is failing so I can test this.
Proposal to limit output to last 50 or so lines
Variation to show only ERROR, but it will cut off important part because Errors are multi line.
Affected line: https://github.com/sap-linuxlab/community.sap_install/blob/d047f9343f1bd2ac970e02b33964281a094f996d/roles/sap_swpm/tasks/swpm.yml#L84