Merge "Fetch docker logs in post run"

This commit is contained in:
Zuul 2019-09-24 01:58:42 +00:00 committed by Gerrit Code Review
commit 85b23ab759
4 changed files with 18 additions and 12 deletions

View File

@ -91,6 +91,7 @@
s-object: false
s-container: false
s-proxy: false
post-run: playbooks/zun-tempest-base/post.yaml
- job:
name: zun-tempest-multinode-docker-sql
@ -138,6 +139,7 @@
zun: https://opendev.org/openstack/zun
kuryr-libnetwork: https://opendev.org/openstack/kuryr-libnetwork
devstack-plugin-container: https://opendev.org/openstack/devstack-plugin-container
post-run: playbooks/fullstack/post.yaml
- project:
templates:

View File

@ -0,0 +1,3 @@
- hosts: all
roles:
- fetch_docker_log

View File

@ -1,13 +1,3 @@
- hosts: all
tasks:
- name: Ensure {{ ansible_user_dir }}/logs exists
become: True
file:
path: "{{ ansible_user_dir }}/logs"
state: directory
owner: "{{ ansible_user }}"
- name: Copy over docker systemd unit journals
shell:
cmd: |
sudo journalctl -o short-precise --unit docker | sudo tee {{ ansible_user_dir }}/logs/docker.txt > /dev/null
executable: /bin/bash
roles:
- fetch_docker_log

View File

@ -0,0 +1,11 @@
- name: Ensure {{ ansible_user_dir }}/logs exists
become: True
file:
path: "{{ ansible_user_dir }}/logs"
state: directory
owner: "{{ ansible_user }}"
- name: Copy over docker systemd unit journals
shell:
cmd: |
sudo journalctl -o short-precise --unit docker | sudo tee {{ ansible_user_dir }}/logs/docker.txt > /dev/null
executable: /bin/bash