summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Belanger <pabelanger@redhat.com>2018-07-21 20:04:50 -0400
committerPaul Belanger <pabelanger@redhat.com>2018-08-14 21:35:02 -0400
commit81b000901c1aad89c73d5e7b33193c9f33fc0bff (patch)
tree4f6041109aa10bdbebbf7fce90357a25d2babda9
parent7ef2873b48334f97374cf943320f2b2e4b471f51 (diff)
Use new log collection process
While this isn't 100%, it is enough to actually get started using it. Change-Id: I8e4bad97658f98ca5280eca694dc2d9cb4028ad1 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Notes
Notes (review): Code-Review+2: Paul Belanger <pabelanger@redhat.com> Workflow+1: Paul Belanger <pabelanger@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 15 Aug 2018 02:17:51 +0000 Reviewed-on: https://review.openstack.org/584614 Project: openstack/ansible-role-nodepool Branch: refs/heads/master
-rw-r--r--.zuul.yaml1
-rw-r--r--tests/collect-logs.yaml22
-rw-r--r--tests/playbooks/pre.yaml7
3 files changed, 25 insertions, 5 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 6b1efe7..de3aa4d 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -5,6 +5,7 @@
5 post-run: tests/collect-logs.yaml 5 post-run: tests/collect-logs.yaml
6 roles: 6 roles:
7 - zuul: openstack/ansible-role-nodepool 7 - zuul: openstack/ansible-role-nodepool
8 - zuul: openstack/zuul-jobs
8 9
9# Testing for nodepool_install_method: pip 10# Testing for nodepool_install_method: pip
10- job: 11- job:
diff --git a/tests/collect-logs.yaml b/tests/collect-logs.yaml
index 9014f1d..3df2f31 100644
--- a/tests/collect-logs.yaml
+++ b/tests/collect-logs.yaml
@@ -1,10 +1,24 @@
1- hosts: all 1- hosts: all
2 tasks: 2 tasks:
3 - name: Collect nodepool log files 3 - name: Prepare nodepool log files
4 become: yes
4 synchronize: 5 synchronize:
5 dest: "{{ zuul.executor.log_root }}/logs" 6 dest: "{{ zuul_output_dir }}/logs/logs"
6 mode: pull
7 rsync_opts: 7 rsync_opts:
8 - "--relative" 8 - "--relative"
9 src: /var/log/nodepool 9 - "--chown={{ ansible_user_id }}:{{ ansible_user_id }}"
10 src: "{{ item }}"
11 verify_host: true
12 delegate_to: "{{ inventory_hostname }}"
13 with_items:
14 - /etc/nodepool
15 - /var/log/nodepool
16
17 # TODO: Migrate to fetch-zuul-logs when
18 # https://review.openstack.org/#/c/583346/ is merged.
19 - name: Collect log output
20 synchronize:
21 dest: "{{ zuul.executor.log_root }}/"
22 mode: pull
23 src: "{{ zuul_output_dir }}/logs/"
10 verify_host: true 24 verify_host: true
diff --git a/tests/playbooks/pre.yaml b/tests/playbooks/pre.yaml
index d5aa7f3..5386849 100644
--- a/tests/playbooks/pre.yaml
+++ b/tests/playbooks/pre.yaml
@@ -1,9 +1,14 @@
1- hosts: all 1- hosts: all
2 tasks: 2 tasks:
3 # TODO(pabelanger): Remove once this lands in our base job in
4 # project-config.
5 - name: Execute ensure-output-dirs role
6 include_role:
7 name: ensure-output-dirs
8
3 - name: Disable extra wheels mirror 9 - name: Disable extra wheels mirror
4 become: yes 10 become: yes
5 lineinfile: 11 lineinfile:
6 dest: /etc/pip.conf 12 dest: /etc/pip.conf
7 regexp: ^extra-index-url 13 regexp: ^extra-index-url
8 state: absent 14 state: absent
9