Ian Wienand 4689a7d938 nodepool-functional : ignore errors copying logs
If the job stops before the required directories here are created we
get a failure copying, which stops us collecting things that may be
useful to diagnosing the error.  Put the copying in a block that
ignores errors.

Also just copy the /var/log/syslog -- I think this came in originally
from something running on CentOS which doesn't have this, but now we
run on Ubuntu hosts and syslog has interesting things for diagnosing
errors.

Change-Id: Iaca4801a652ef4a67772c804271ea5c1db377051
2021-04-20 09:27:54 -07:00

41 lines
1.2 KiB
YAML

- hosts: all
roles:
- collect-container-logs
tasks:
- name: Copy nodepool logs
ignore_errors: yes
block:
- 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: Copy syslog
become: True
synchronize:
src: "/var/log/syslog"
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