From f7d87aa433d344f5db0201aca047a987cba3a0af Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 2 Jun 2022 11:08:32 -0700 Subject: [PATCH] Capture QEMU core dumps when possible Some of the hardest-to-debug issues are qemu crashes deep in a nova workflow that can't be reproduced locally. This adds a post task to the playbook so that we capture the most recent qemu core dump, if there is one. Change-Id: I48a2ea883325ca920b7e7909edad53a9832fb319 --- .zuul.yaml | 1 + playbooks/post.yaml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index 001ac84f12..fdcee59bc5 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -377,6 +377,7 @@ '{{ devstack_log_dir }}/devstacklog.txt.summary': logs '{{ devstack_log_dir }}/tcpdump.pcap': logs '{{ devstack_log_dir }}/worlddump-latest.txt': logs + '{{ devstack_log_dir }}/qemu.coredump': logs '{{ devstack_full_log}}': logs '{{ stage_dir }}/verify_tempest_conf.log': logs '{{ stage_dir }}/performance.json': logs diff --git a/playbooks/post.yaml b/playbooks/post.yaml index d8d5f6833c..0047d78ea5 100644 --- a/playbooks/post.yaml +++ b/playbooks/post.yaml @@ -17,6 +17,12 @@ dest: "{{ stage_dir }}/verify_tempest_conf.log" state: hard when: tempest_log.stat.exists + - name: Capture most recent qemu crash dump, if any + shell: + executable: /bin/bash + cmd: | + coredumpctl -o {{ devstack_log_dir }}/qemu.coredump dump /usr/bin/qemu-system-x86_64 + ignore_errors: yes roles: - export-devstack-journal - apache-logs-conf