summaryrefslogtreecommitdiff
path: root/ironic_python_agent/hardware.py
diff options
context:
space:
mode:
Diffstat (limited to 'ironic_python_agent/hardware.py')
-rw-r--r--ironic_python_agent/hardware.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py
index fb743744..3f3e4e0c 100644
--- a/ironic_python_agent/hardware.py
+++ b/ironic_python_agent/hardware.py
@@ -2152,6 +2152,13 @@ class GenericHardwareManager(HardwareManager):
utils.execute('parted', device, '-s', '-a',
'optimal', '--', 'mkpart', 'primary',
start_str, end_str)
+
+ # Parted/udev partition creation is asynchronous.
+ # Wait for udev events to be processed before going to
+ # next step. This avoids getting errors at mdadm
+ # create because a device is not ready yet.
+ _udev_settle()
+
# Necessary, if we want to avoid hitting
# an error when creating the mdadm array below
# 'mdadm: cannot open /dev/nvme1n1p1: No such file