Skip to content

Commit

Permalink
tests: stabilization: reattempt to add disks in case 'vda' was not ch…
Browse files Browse the repository at this point in the history
…osen

Sometimes the kernel does not pick 'vda' for the first attached disk but 'vdb' directly. This is
seeminglyl some race condition but it heavily affects our tests runs
since 'vda' is often hardcoded. Let's attempt to eject and re-add disks
if this happens.
  • Loading branch information
KKoukiou committed Feb 27, 2025
1 parent 6f54401 commit f05a8b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/anacondalib.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,14 @@ def setUp(self):
# Wait for minimum /dev/vda to be detected before proceeding
try:
wait(lambda: "vda" in m.execute("ls /dev"), tries=5, delay=5)
except Error as e:
except Error:
print("vda not detected")
print(m.execute("lsblk"))
raise e
self.removeAllDisks()
s.udevadm_settle()
self.addAllDisks()
s.udevadm_settle()
wait(lambda: "vda" in m.execute("ls /dev"), tries=5, delay=5)

self.partition_disk()

Expand Down

0 comments on commit f05a8b9

Please sign in to comment.