From ca2455c57b7ffc13ae7499867ada459b591c5503 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 8 Dec 2021 17:43:58 +0000 Subject: [PATCH] Collect mailman logs in deployment testing Get the logs from the test mailman deployments for inspection in build results. Change-Id: I68ea634d6048691bf14a573e66983038bc485f3c --- playbooks/zuul/run-lists-post.yaml | 11 +++++++++++ zuul.d/system-config-run.yaml | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 playbooks/zuul/run-lists-post.yaml diff --git a/playbooks/zuul/run-lists-post.yaml b/playbooks/zuul/run-lists-post.yaml new file mode 100644 index 0000000000..6ff9af0449 --- /dev/null +++ b/playbooks/zuul/run-lists-post.yaml @@ -0,0 +1,11 @@ +- hosts: lists.openstack.org + tasks: + - name: Collect per-site mailman log directories + shell: + cmd: | + mkdir -p /var/log/mailman + for logs in /srv/mailman/*/logs ; do + cp -a $logs /var/log/mailman/$(basename $(dirname $logs)) + done + become: yes + ignore_errors: true diff --git a/zuul.d/system-config-run.yaml b/zuul.d/system-config-run.yaml index 2ff86bbf4b..92a8a78c05 100644 --- a/zuul.d/system-config-run.yaml +++ b/zuul.d/system-config-run.yaml @@ -233,6 +233,7 @@ parent: system-config-run description: | Run the playbook for a list server. + post-run: playbooks/zuul/run-lists-post.yaml nodeset: nodes: - name: bridge.openstack.org @@ -255,11 +256,19 @@ - playbooks/zuul/templates/host_vars/lists.katacontainers.io.yaml.j2 - testinfra/test_lists_k_i.py - testinfra/test_lists_o_o.py + - playbooks/zuul/run-lists-post.yaml vars: run_playbooks: - playbooks/service-lists.yaml # Run this twice to check idempotency - playbooks/service-lists.yaml + host-vars: + lists.katacontainers.io: + host_copy_output: + '/var/log/mailman': logs + lists.openstack.org: + host_copy_output: + '/var/log/mailman': logs - job: name: system-config-run-nodepool