[yocto] [meta-anaconda][PATCH 1/1] initramfs-module-setup-live: call udev settle before umounting /run/media/*

Ovidiu Panait ovidiu.panait at windriver.com
Sun Sep 22 23:41:35 PDT 2019


This fixes a race conditition which leaves devices mounted, causing the
following anaconda installation failure:
File "/usr/lib64/python3.5/site-packages/gi/overrides/BlockDev.py", line 963, in wrapped
  raise transform[1](msg)
File "/usr/lib64/python3.5/site-packages/blivet/devices/lvm.py", line 913, in _teardown
  blockdev.lvm.lvdeactivate(self.vg.name, self._name)
File "/usr/lib64/python3.5/site-packages/blivet/threads.py", line 53, in run_with_lock
  return m(*args, **kwargs)
File "/usr/lib64/python3.5/site-packages/blivet/devices/storage.py", line 431, in teardown
  self._teardown(recursive=recursive)
File "/usr/lib64/python3.5/site-packages/blivet/threads.py", line 53, in run_with_lock
  return m(*args, **kwargs)
File "/usr/lib64/python3.5/site-packages/blivet/devices/lvm.py", line 1933, in teardown
  return DMDevice.teardown(self, recursive)
gi.overrides.BlockDev.LVMError: Process reported exit code 5:   Logical volume wrll_intel-x86-64/root contains a filesystem in use.

Signed-off-by: Ovidiu Panait <ovidiu.panait at windriver.com>
---
 recipes-installer/initrdscripts/files/umountfs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-installer/initrdscripts/files/umountfs b/recipes-installer/initrdscripts/files/umountfs
index f01adea..4792110 100644
--- a/recipes-installer/initrdscripts/files/umountfs
+++ b/recipes-installer/initrdscripts/files/umountfs
@@ -3,6 +3,9 @@ umountfs_enabled() {
 }
 
 umountfs_run() {
+    # Make sure /run/media is fully populated
+    udevadm settle
+
     # Umount other media for anaconda
     for dir in `awk '/\/dev.* \/run\/media/{print $2}' /proc/mounts`; do
         umount $dir
-- 
2.18.1



More information about the yocto mailing list