From a14a7a1ae02fa70270af62093e6d60af91077824 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 29 Mar 2017 18:14:07 +1100 Subject: [PATCH] Enable libvirt coredumps & save to logs With this flag devstack will enable coredumps for libvirt, which are saved to /var/core. Compress and save them to the logs. Change-Id: I381ba3b540c57b2ca5d73087473c8be4b5b32cad Partial-Bug: 1643911 Depends-On: If7cd54e804a5a389a0d82a325b58f5b41b8ef0db --- devstack-vm-gate.sh | 3 +++ functions.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 502932e3..7e69109a 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -384,6 +384,9 @@ function setup_localrc { # set this until all testing platforms have libvirt >= 1.2.11 # see bug #1501558 localrc_set "$localrc_file" "EBTABLES_RACE_FIX" "True" + # This will put libvirt coredumps into /var/core + # https://bugs.launchpad.net/nova/+bug/1643911 + localrc_set "$localrc_file" DEBUG_LIBVIRT_COREDUMPS "True" if [[ "$DEVSTACK_GATE_TOPOLOGY" == "multinode" ]] && [[ $DEVSTACK_GATE_NEUTRON -eq "1" ]]; then # Reduce the MTU on br-ex to match the MTU of underlying tunnels diff --git a/functions.sh b/functions.sh index d6964c63..a1379ab8 100644 --- a/functions.sh +++ b/functions.sh @@ -834,6 +834,12 @@ function cleanup_host { fi save_file /etc/glusterfs/glusterd.vol glusterd.vol + # gzip and save any coredumps in /var/core + if [ -d /var/core ]; then + sudo gzip -r /var/core + sudo cp -r /var/core $BASE/logs/ + fi + # Make sure the current user can read all the logs and configs sudo chown -RL $USER:$USER $BASE/logs/ # (note X not x ... execute/search only if the file is a directory