1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-04-20 11:29:54 +00:00

xenguest-manager: Wait longer for /dev/xvdaX creation

Implement a wait block of 20s with exit condition for checking
/dev/xvdaX creation.
For example, in cases where the rootfs is mounted via NFS, a longer
time is needed until the xvda device appears in the system.

Change-Id: I44cbcf2a43aeb476eae92d5b6d2cfd683e4bdf21
Issue-Id: SCM-929
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Diego Sueiro
2020-04-30 14:29:33 +01:00
committed by Jon Mason
parent 23f2f3d180
commit 119d84b39e

View File

@@ -234,10 +234,17 @@ function xenguest_disk_init()
exit 1
fi
# Sometimes it takes time to see the device
if [ ! -b /dev/xvda${part} ]; then
sleep 1
fi
# Loop for 20s to wait until /dev/xvdaX appears
i=0
while [ ! -b /dev/xvda${part} ]; do
((i++))
if [[ "$i" == '40' ]]; then
break;
fi
sleep 0.5
done
if [ ! -b /dev/xvda${part} ]; then
echo "${PREF} Partition ${part} creation error"
xenguest_detach_disk