tmt: archive audit and journal logs after test execution#6850
Conversation
|
@nalind PTAL. In the failed testing-farm job, see cc @containers/buildah-maintainers Related: #6800 (comment) |
|
audit logs are part of the journald output normally I think? On cirrus we just upload the full journal output because that may contain much more useful information there, not just audit. |
|
Line 184 in 520f469 buildah/contrib/cirrus/logcollector.sh Line 18 in 520f469 |
sgtm, I can update PR to include that too. |
| fi | ||
|
|
||
| # Capture full journal | ||
| journalctl --no-pager --all --output=short-precise > "$TMT_PLAN_DATA/logs/journal.log" 2>&1 |
There was a problem hiding this comment.
you likely want the -b here so we only see the logs of the current boot, in case there are older journal files around already on the system, or does tmt reboot the VM before collecting the logs?
Also just use &> "$TMT_PLAN_DATA/logs/journal.log" to redirect both stdout/err which is simpler to use than defining to redirects after each other.
There was a problem hiding this comment.
you likely want the
-bhere so we only see the logs of the current boot, in case there are older journal files around already on the system, or does tmt reboot the VM before collecting the logs?
AFAIK, it doesn't reboot unless you issue a tmt-reboot, so we should be fine with -b.
Also just use
&> "$TMT_PLAN_DATA/logs/journal.log"to redirect both stdout/err which is simpler to use than defining to redirects after each other.
Yes, thanks. Updating..
Archive both audit.log and full journal output to TMT_PLAN_DATA/logs/ for post-test debugging and analysis. Signed-off-by: Lokesh Mandvekar <lsm5@linux.com>
|
@containers/buildah-maintainers good for another look. Both audit and journal logs captured in |
|
LGTM |
What type of PR is this?
/kind other
What this PR does / why we need it:
captures audit logs
How to verify it
audit logs visible somewhere in testing-farm job run.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?