Skip to content

Commit 1059a0c

Browse files
danpawlikbshewale
authored andcommitted
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 <dpawlik@redhat.com>
1 parent 921efc8 commit 1059a0c

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

ci/playbooks/collect-logs.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,21 @@
180180
no_log: true
181181
args:
182182
chdir: "{{ ansible_user_dir }}/zuul-output/logs/"
183+
184+
- name: Compress logs bigger than 2MB
185+
when: cifmw_compress_all_logs | default(true)
186+
ansible.builtin.shell: >
187+
find "{{ ansible_user_dir }}/zuul-output/"
188+
-type f
189+
! -name "*.gz"
190+
! -name "*.xz"
191+
-size +2M
192+
-exec gzip --best "{}" +
193+
ignore_errors: true # noqa: ignore-errors
194+
195+
- name: Copy files from workspace on node
196+
vars:
197+
work_dir: "{{ ansible_user_dir }}/zuul-output/logs"
198+
ansible.builtin.include_role:
199+
name: fetch-output
200+
ignore_errors: true # noqa: ignore-errors

ci/playbooks/e2e-collect-logs.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,21 @@
5050
no_log: true
5151
args:
5252
chdir: "{{ ansible_user_dir }}/zuul-output/logs/"
53+
54+
- name: Compress logs bigger than 2MB
55+
when: cifmw_compress_all_logs | default(true)
56+
ansible.builtin.shell: >
57+
find "{{ ansible_user_dir }}/zuul-output/"
58+
-type f
59+
! -name "*.gz"
60+
! -name "*.xz"
61+
-size +2M
62+
-exec gzip --best "{}" +
63+
ignore_errors: true # noqa: ignore-errors
64+
65+
- name: Copy files from workspace on node
66+
vars:
67+
work_dir: "{{ ansible_user_dir }}/zuul-output/logs"
68+
ansible.builtin.include_role:
69+
name: fetch-output
70+
ignore_errors: true # noqa: ignore-errors

0 commit comments

Comments
 (0)