From aef7da7bc98ce73c7929fdf7be558f98b857dc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 31 Jul 2024 22:02:48 +0200 Subject: [PATCH] tests: k8s: Rotate & cleanup journal for every run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will help to avoid huge logs, and allow us to debug issues in a better way. Signed-off-by: Fabiano FidĂȘncio --- tests/integration/kubernetes/gha-run.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index c5c4654d2b..a9c8358988 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -265,6 +265,17 @@ function uninstall_kbs_client() { } function run_tests() { + if [ "${K8S_TEST_HOST_TYPE}" = "baremetal" ]; then + # Baremetal self-hosted runners end up accumulating way too much log + # and when those get displayed it's very hard to understand what's + # part of the current run and what's something from the past coming + # to haunt us. + # + # With this in mind, let's ensure we do rotate the logs on every single + # run of the tests, as its first step. + sudo journalctl --vacuum-time 1s --rotate + fi + ensure_yq platform="${1:-}"