From 45a7a459612fb039c94706916d7d36719d206c83 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Tue, 5 Mar 2019 22:16:54 +0100 Subject: [PATCH] Store journal log in functional tests results It may helpdebug some issues related to keepalived and/or dnsmasq which are logging to journal only. Change-Id: I42c311f9111e0a0d1a6ea3a7aeab0fef8d77c549 --- playbooks/legacy/neutron-functional/post.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/playbooks/legacy/neutron-functional/post.yaml b/playbooks/legacy/neutron-functional/post.yaml index dac875340aa..3b3df752f8f 100644 --- a/playbooks/legacy/neutron-functional/post.yaml +++ b/playbooks/legacy/neutron-functional/post.yaml @@ -66,6 +66,22 @@ - --exclude=* - --prune-empty-dirs + # TODO(slaweq): this should be moved to separate role and used in zuulv3 + # jobs definitions also + - name: Store journal logs in {{ ansible_user_dir }}/workspace/logs/journal.log + become: yes + shell: + cmd: | + /bin/journalctl -a > {{ ansible_user_dir }}/workspace/logs/journal.log + + - name: Set journal.log file permissions + become: yes + file: + path: '{{ ansible_user_dir }}/workspace/logs/journal.log' + owner: '{{ ansible_user }}' + group: '{{ ansible_user }}' + mode: 0644 + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node synchronize: src: '{{ ansible_user_dir }}/workspace/'