[CI] Collect info about environment before deploy
And also collect lsmod listing. These both are useful to have a clearer picture of the original environment and the effect kolla ansible had on it. Change-Id: I5d87cfd45e4369df40b8195124535e59d24700c3
This commit is contained in:
parent
d85af34ccd
commit
e6edec78e5
@ -3,7 +3,7 @@
|
|||||||
set +o errexit
|
set +o errexit
|
||||||
|
|
||||||
copy_logs() {
|
copy_logs() {
|
||||||
LOG_DIR=/tmp/logs
|
LOG_DIR=${LOG_DIR:-/tmp/logs}
|
||||||
|
|
||||||
cp -rnL /var/lib/docker/volumes/kolla_logs/_data/* ${LOG_DIR}/kolla/
|
cp -rnL /var/lib/docker/volumes/kolla_logs/_data/* ${LOG_DIR}/kolla/
|
||||||
cp -rnL /etc/kolla/* ${LOG_DIR}/kolla_configs/
|
cp -rnL /etc/kolla/* ${LOG_DIR}/kolla_configs/
|
||||||
@ -69,6 +69,7 @@ copy_logs() {
|
|||||||
getent ahostsv6 $(hostname)) &> ${LOG_DIR}/system_logs/getent_ahostsvX.txt
|
getent ahostsv6 $(hostname)) &> ${LOG_DIR}/system_logs/getent_ahostsvX.txt
|
||||||
|
|
||||||
sysctl -a &> ${LOG_DIR}/system_logs/sysctl.txt
|
sysctl -a &> ${LOG_DIR}/system_logs/sysctl.txt
|
||||||
|
lsmod &> ${LOG_DIR}/system_logs/lsmod.txt
|
||||||
|
|
||||||
if [ `command -v dpkg` ]; then
|
if [ `command -v dpkg` ]; then
|
||||||
dpkg -l > ${LOG_DIR}/system_logs/dpkg-l.txt
|
dpkg -l > ${LOG_DIR}/system_logs/dpkg-l.txt
|
||||||
|
@ -56,6 +56,24 @@
|
|||||||
path: "{{ logs_dir }}"
|
path: "{{ logs_dir }}"
|
||||||
state: "directory"
|
state: "directory"
|
||||||
|
|
||||||
|
- name: Ensure /tmp/logs/pre dir
|
||||||
|
file:
|
||||||
|
path: "{{ logs_dir }}/pre"
|
||||||
|
state: "directory"
|
||||||
|
|
||||||
|
- name: Run diagnostics script
|
||||||
|
environment:
|
||||||
|
LOG_DIR: "{{ logs_dir }}/pre"
|
||||||
|
KOLLA_INTERNAL_VIP_ADDRESS: "{{ kolla_internal_vip_address }}"
|
||||||
|
script: get_logs.sh
|
||||||
|
register: get_logs_result
|
||||||
|
become: true
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
|
- name: Print get_logs output
|
||||||
|
debug:
|
||||||
|
msg: "{{ get_logs_result.stdout }}"
|
||||||
|
|
||||||
- name: Ensure node directories
|
- name: Ensure node directories
|
||||||
file:
|
file:
|
||||||
path: "{{ logs_dir }}/{{ item }}"
|
path: "{{ logs_dir }}/{{ item }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user