Browse Source

Merge "Also collect journald logs"

changes/88/591888/27
Zuul 10 months ago
parent
commit
b5fd6f6672
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      tests/collect-logs.yaml

+ 13
- 0
tests/collect-logs.yaml View File

@@ -1,5 +1,18 @@
1 1
 - hosts: all
2 2
   tasks:
3
+    - name: Ensure journald logs directory exists
4
+      file:
5
+        path: "{{ zuul_output_dir }}/logs/logs/var/log/journal"
6
+        state: directory
7
+
8
+    - name: Collect journald logs
9
+      shell: "sudo journalctl -u {{ item }}.service | tee {{ zuul_output_dir }}/logs/logs/var/log/journal/{{ item }}.service.log"
10
+      args:
11
+        creates: "{{ zuul_output_dir }}/logs/logs/var/log/journal/{{ item }}.service.log"
12
+      with_items:
13
+        - nodepool-builder
14
+        - nodepool-launcher
15
+
3 16
     - name: Prepare nodepool log files
4 17
       become: yes
5 18
       synchronize:

Loading…
Cancel
Save