7a0a2dac1a
On some deployments install fails as we keep one FD open during install. This leads to hangs when Anaconda 'post' stage returns. On other deployments install fails as udev sometimes creates multiple links to the same devices in /dev/disk/by-path. We iterate through this list and, because they are not unique, we try to run flocks multiple times for the same device. Locking a device multiple times doesn't work, the second flock waits for first lock to release. This commit: o removes 'exec {stdout}>&1' from ks-functions.sh so it no longer opens FDs in 'post' stage. For the pre stage we open it only when needed; o makes sure that list of storage devices is unique; o increases timeout of udevadm settle from its default of 180s to 300s, the value used throughout Anaconda. This helps with slower hardware. Closes-Bug: 1889427 Change-Id: I348f10d96a78ea2c1c25fe6cf48462b0bc31fb84 Signed-off-by: Ovidiu Poncea <ovidiu.poncea@windriver.com>
22 lines
554 B
INI
22 lines
554 B
INI
|
|
# Log info about system state at end of partitioning operation.
|
|
for dev in $STOR_DEVS; do
|
|
wlog "Partition table at end of script for $dev is:"
|
|
parted -s $dev unit mib print
|
|
done
|
|
|
|
# Close all FDs and wait for udev to reshuffle all partitions.
|
|
wlog "Releasing storage device locks and FDs."
|
|
for fd in $STOR_DEV_FDS
|
|
do
|
|
flock -u "$fd"
|
|
exec {fd}>&-
|
|
done
|
|
sleep 2
|
|
udevadm settle --timeout=300 || report_pre_failure_with_msg "ERROR: udevadm settle failed!"
|
|
|
|
# Rescan LVM cache to avoid warnings for VGs that were recreated.
|
|
pvscan --cache
|
|
|
|
%end
|