Skip to content

Commit e793a16

Browse files
committed
test: add debugging for raid tests
The raid tests are the ones which most often fail with flakes. Add some debugging to try to find out why they fail. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
1 parent 4dc4779 commit e793a16

5 files changed

Lines changed: 568 additions & 491 deletions

tests/tasks/debug.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
- name: Gather debug information
3+
shell:
4+
executable: /bin/bash
5+
cmd: |
6+
set -euxo pipefail
7+
exec 1>&2
8+
if type -p lsblk >/dev/null; then
9+
lsblk -p --pairs --bytes -o NAME,TYPE,SIZE,FSTYPE,LOG-SEC
10+
fi
11+
if type -p mdadm >/dev/null; then
12+
mdadm --misc --examine --scan
13+
fi
14+
if type -p dmsetup >/dev/null; then
15+
dmsetup ls --tree --separator /
16+
fi
17+
if type -p lvm >/dev/null; then
18+
lvm vgdisplay
19+
fi
20+
if type -p udevadm >/dev/null; then
21+
udevadm settle -t 0
22+
fi
23+
changed_when: false
24+
25+
- name: Gather RAID volume information
26+
when:
27+
- storage_test_volume.type | d(none) == 'raid'
28+
- storage_test_volume._raw_device | d("") | length > 0
29+
block:
30+
- name: Get information about RAID
31+
command: mdadm --detail {{ storage_test_volume._raw_device | quote }}
32+
changed_when: false
33+
34+
- name: Gather RAID pool information
35+
when:
36+
- storage_test_pool.raid_level | d(none) != none
37+
- storage_test_pool.name | d("") | length > 0
38+
block:
39+
- name: Get information about RAID
40+
command: mdadm --detail /dev/md/{{ storage_test_pool.name }}-1
41+
changed_when: false

0 commit comments

Comments
 (0)