Subject: [PATCH] [BZ 151594] dbginfo: Collect docker debug output. From: Karsten Graul Description: dbginfo: Collect docker debug output. Symptom: dbginfo.sh output does not contain docker debug output. Problem: dbginfo.sh does not collect docker debug output. Solution: Add invocation of docker debug commands to dbginfo.sh. Reproduction: - Upstream-ID: - Problem-ID: 151594 Signed-off-by: Karsten Graul --- scripts/dbginfo.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 4 deletions(-) --- a/scripts/dbginfo.sh +++ b/scripts/dbginfo.sh @@ -2,7 +2,7 @@ # # dbginfo.sh - Tool to collect runtime, configuration, and trace information # -# Copyright IBM Corp. 2002, 2016 +# Copyright IBM Corp. 2002, 2017 # # Switching to neutral locale @@ -18,7 +18,7 @@ readonly SCRIPTNAME="${0##*/}" print_version() { cat </dev/null | cut -d'.' -f1) @@ -301,6 +304,8 @@ LOGFILES="\ /var/log/yum.log\ /var/log/openvswitch/ovs-vswitchd.log\ /var/log/openvswitch/ovsdb-server.log\ + /var/run/docker/libcontainerd/containerd/events.log\ + /run/containerd/events.log\ " ######################################## @@ -351,6 +356,9 @@ CONFIGFILES="\ /etc/xinet.d\ /etc/*release\ $(find /lib/modules -name modules.dep 2>/dev/null)\ + /etc/docker\ + /usr/lib/systemd\ + /etc/apparmor.d\ " ######################################## @@ -436,6 +444,16 @@ CMDS="uname -a\ :systemctl --all --no-pager show\ :systemctl --all --no-pager list-units\ :systemctl --all --no-pager list-unit-files\ + :docker info\ + :docker images\ + :docker network ls\ + :docker ps\ + :docker ps -a\ + :docker stats --no-stream\ + :docker version\ + :systemctl status docker.service\ + :df /var/lib/docker\ + :df --inodes /var/lib/docker\ " ######################################## @@ -767,13 +785,43 @@ collect_domain_xml() { } ######################################## +collect_docker() { + local item_list + local item + + # call docker inspect for all containers + item_list=$(docker ps -qa) + if test -n "${item_list}"; then + pr_syslog_stdout "10a of ${COLLECTION_COUNT}: Collecting docker container output" + for item in ${item_list}; do + call_run_command "docker inspect ${item}" "${OUTPUT_FILE_DOCKER}" + done + else + pr_syslog_stdout "10a of ${COLLECTION_COUNT}: Collecting docker container output skipped" + fi + + # call docker inspect for all networks + item_list=$(docker network ls -q) + if test -n "${item_list}"; then + pr_syslog_stdout "10b of ${COLLECTION_COUNT}: Collecting docker network output" + for item in ${item_list}; do + call_run_command "docker network inspect ${item}" "${OUTPUT_FILE_DOCKER}" + done + else + pr_syslog_stdout "10b of ${COLLECTION_COUNT}: Collecting docker network output skipped" + fi + + pr_log_stdout " " +} + +######################################## post_processing() { local file_mtime local file_mtime_epoche local tmp_file local file_name - pr_syslog_stdout "10 of ${COLLECTION_COUNT}: Postprocessing" + pr_syslog_stdout "11 of ${COLLECTION_COUNT}: Postprocessing" find "${WORKPATH}etc/libvirt/qemu/" -maxdepth 1 -name "*.xml" 2>/dev/null | while IFS= read -r file_name; do file_mtime_epoche=$(stat --format=%Y "${file_name}") @@ -1056,6 +1104,8 @@ collect_ovs collect_domain_xml +collect_docker + post_processing create_package