Fetch docker logs in post run

Change-Id: If025a9d3f8e2708c1bebcb2419dd840b15cab79b
This commit is contained in:
Hongbin Lu 2019-09-02 04:03:00 +00:00
parent ec96c5e96b
commit 87a0764cfb
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