Michael Hudson-Doyle has proposed merging ~mwhudson/curtin:lp-1876626 into 
curtin:master.

Commit message:
block.detect_multipath: ignore fake "devices" from /proc/mounts

A tmpfs can be mounted with any old junk in the "device" field and
unfortunately casper sometimes puts "/dev/shm" there, which is usually a
directory. Ignore such cases.  (See https://bugs.launchpad.net/bugs/1876626)


Requested reviews:
  curtin developers (curtin-dev)

For more details, see:
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/383319
-- 
Your team curtin developers is requested to review the proposed merge of 
~mwhudson/curtin:lp-1876626 into curtin:master.
diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py
index a7fe22f..c006aa4 100644
--- a/curtin/block/__init__.py
+++ b/curtin/block/__init__.py
@@ -637,6 +637,12 @@ def detect_multipath(target_mountpoint=None):
         for device in (os.path.realpath(dev)
                        for (dev, _mp, _vfs, _opts, _freq, _passno)
                        in get_proc_mounts() if dev.startswith('/dev/')):
+            if not is_block_device(device):
+                # A tmpfs can be mounted with any old junk in the "device"
+                # field and unfortunately casper sometimes puts "/dev/shm"
+                # there, which is usually a directory. Ignore such cases.
+                # (See https://bugs.launchpad.net/bugs/1876626)
+                continue
             if _device_is_multipathed(device):
                 return device
 
-- 
Mailing list: https://launchpad.net/~curtin-dev
Post to     : curtin-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~curtin-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to