fix for RAIDs cleanup in prepare
Signed-off-by: Karolina Rogowska <karolina.rogowsky@gmail.com>
This commit is contained in:
parent
a299d0bb66
commit
05ed83c6ae
@ -183,13 +183,16 @@ def base_prepare(item):
|
|||||||
raids = Raid.discover()
|
raids = Raid.discover()
|
||||||
for raid in raids:
|
for raid in raids:
|
||||||
# stop only those RAIDs, which are comprised of test disks
|
# stop only those RAIDs, which are comprised of test disks
|
||||||
if all(map(
|
if all(map(lambda device:
|
||||||
lambda d: d.system_path in [bd.system_path for bd in TestRun.dut.disks],
|
any(map(lambda disk_path:
|
||||||
raid.array_devices
|
disk_path in device.system_path,
|
||||||
)):
|
[bd.system_path for bd in TestRun.dut.disks])),
|
||||||
|
raid.array_devices)):
|
||||||
raid.umount_all_partitions()
|
raid.umount_all_partitions()
|
||||||
raid.remove_partitions()
|
raid.remove_partitions()
|
||||||
raid.stop()
|
raid.stop()
|
||||||
|
for device in raid.array_devices:
|
||||||
|
Mdadm.zero_superblock(device.system_path)
|
||||||
|
|
||||||
for disk in TestRun.dut.disks:
|
for disk in TestRun.dut.disks:
|
||||||
disk.umount_all_partitions()
|
disk.umount_all_partitions()
|
||||||
|
Loading…
Reference in New Issue
Block a user