![Mohammed Naser](/assets/img/avatar_default.png)
This change switches the post bits to use a new centralized role to collect all container logs. Depends-On: https://review.opendev.org/701867 Change-Id: I1b1bdad108515604dce45c7b418bfaae1bf235a8
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
- hosts: all
|
|
roles:
|
|
- collect-container-logs
|
|
tasks:
|
|
- name: Copy nodepool log files
|
|
synchronize:
|
|
src: /var/log/nodepool
|
|
dest: '{{ zuul.executor.log_root }}'
|
|
mode: pull
|
|
- name: Copy nodepool config files
|
|
synchronize:
|
|
src: /etc/nodepool
|
|
dest: '{{ zuul.executor.log_root }}'
|
|
mode: pull
|
|
- name: Copy instance console logs
|
|
become: true
|
|
synchronize:
|
|
src: /opt/stack/data/nova/instances
|
|
dest: '{{ zuul.executor.log_root }}'
|
|
mode: pull
|
|
rsync_opts:
|
|
- "--include=*/"
|
|
- "--include=console.log"
|
|
- "--exclude=*"
|
|
- name: Export legacy syslog.txt
|
|
become: true
|
|
shell:
|
|
# The journal contains everything running under systemd, we'll
|
|
# build an old school version of the syslog with just the
|
|
# kernel and sudo messages.
|
|
cmd: |
|
|
journalctl \
|
|
-t kernel \
|
|
-t sudo \
|
|
--no-pager \
|
|
| gzip - > {{ ansible_user_dir }}/syslog.txt.gz
|
|
|
|
- name: Copy syslog
|
|
become: True
|
|
synchronize:
|
|
src: "{{ ansible_user_dir }}/syslog.txt.gz"
|
|
dest: '{{ zuul.executor.log_root }}'
|
|
mode: pull
|
|
|
|
- name: Copy docker logs
|
|
become: True
|
|
synchronize:
|
|
src: '{{ ansible_user_dir }}/zuul-output/logs/docker'
|
|
dest: '{{ zuul.executor.log_root }}'
|
|
mode: pull
|