Merge "Collect openstack logs"
This commit is contained in:
commit
0003de5197
@ -139,6 +139,7 @@
|
|||||||
under nodepool, using source versions of dependencies such as
|
under nodepool, using source versions of dependencies such as
|
||||||
nodepool, dib, openstacksdk and glean.
|
nodepool, dib, openstacksdk and glean.
|
||||||
parent: nodepool-functional-container-openstack-siblings-base
|
parent: nodepool-functional-container-openstack-siblings-base
|
||||||
|
post-run: playbooks/dib-nodepool/collect-openstack-logs.yaml
|
||||||
vars:
|
vars:
|
||||||
nodepool_debug: true
|
nodepool_debug: true
|
||||||
|
|
||||||
|
21
playbooks/dib-nodepool/collect-openstack-logs.yaml
Normal file
21
playbooks/dib-nodepool/collect-openstack-logs.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: Copy openstack logs
|
||||||
|
ignore_errors: yes
|
||||||
|
block:
|
||||||
|
- name: Make openstack logs dir
|
||||||
|
become: true
|
||||||
|
file:
|
||||||
|
path: /var/log/nodepool/openstack
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
- name: Write out openstack logs
|
||||||
|
become: true
|
||||||
|
shell:
|
||||||
|
cmd: |
|
||||||
|
u=""
|
||||||
|
name=""
|
||||||
|
for u in $(systemctl list-unit-files | grep devstack | awk '{print $1}'); do
|
||||||
|
name=$(echo $u | sed 's/devstack@/screen-/' | sed 's/\.service//')
|
||||||
|
journalctl -o short-precise --unit $u > /var/log/nodepool/openstack/$name.txt
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user