From 426df59169e590035a99823217116542d4377c25 Mon Sep 17 00:00:00 2001 From: Daniel Pawlik Date: Mon, 15 Dec 2025 17:31:11 +0100 Subject: [PATCH] Collect kubelet logs before synchronization The task that was responsible for collecting kubelet logs was done after the synchronization, so in some jobs we did not get kubelet service logs. Signed-off-by: Daniel Pawlik --- ci/playbooks/collect-logs.yml | 18 ++++++++++++++++++ ci/playbooks/e2e-collect-logs.yml | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/ci/playbooks/collect-logs.yml b/ci/playbooks/collect-logs.yml index 62d0a8f7ad..b77d50d244 100644 --- a/ci/playbooks/collect-logs.yml +++ b/ci/playbooks/collect-logs.yml @@ -180,3 +180,21 @@ no_log: true args: chdir: "{{ ansible_user_dir }}/zuul-output/logs/" + + - name: Compress logs bigger than 2MB + when: cifmw_compress_all_logs | default(true) + ansible.builtin.shell: > + find "{{ ansible_user_dir }}/zuul-output/" + -type f + ! -name "*.gz" + ! -name "*.xz" + -size +2M + -exec gzip --best "{}" + + ignore_errors: true # noqa: ignore-errors + + - name: Copy files from workspace on node + vars: + work_dir: "{{ ansible_user_dir }}/zuul-output/logs" + ansible.builtin.include_role: + name: fetch-output + ignore_errors: true # noqa: ignore-errors diff --git a/ci/playbooks/e2e-collect-logs.yml b/ci/playbooks/e2e-collect-logs.yml index a1719a31a2..a006e70c22 100644 --- a/ci/playbooks/e2e-collect-logs.yml +++ b/ci/playbooks/e2e-collect-logs.yml @@ -50,3 +50,21 @@ no_log: true args: chdir: "{{ ansible_user_dir }}/zuul-output/logs/" + + - name: Compress logs bigger than 2MB + when: cifmw_compress_all_logs | default(true) + ansible.builtin.shell: > + find "{{ ansible_user_dir }}/zuul-output/" + -type f + ! -name "*.gz" + ! -name "*.xz" + -size +2M + -exec gzip --best "{}" + + ignore_errors: true # noqa: ignore-errors + + - name: Copy files from workspace on node + vars: + work_dir: "{{ ansible_user_dir }}/zuul-output/logs" + ansible.builtin.include_role: + name: fetch-output + ignore_errors: true # noqa: ignore-errors