Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion virttest/utils_test/libvirt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,16 @@ def pre_pool(self, pool_name, pool_type, pool_target, emulated_image, **kwargs):
disk_label = source_format
if disk_label == "dos":
disk_label = "msdos"
mk_label(device_name, disk_label)
def mk_label_wait():
try:
mk_label(device_name, disk_label)
except process.CmdError:
return False
return True
result = utils_misc.wait_for(
mk_label_wait, 10,
text="Label not created as device is unavailable. " \
"Retrying...")
# Disk pool does not allow to create volume by virsh command,
# so introduce parameter 'pre_disk_vol' to create partition(s)
# by 'parted' command, the parameter is a list of partition size,
Expand Down
Loading