]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: udevadm settle before partprobe
authorGary Lowell <glowell@inktank.com>
Tue, 26 Mar 2013 18:31:16 +0000 (11:31 -0700)
committerSage Weil <sage@inktank.com>
Fri, 26 Apr 2013 20:40:05 +0000 (13:40 -0700)
After changing the partition table, allow the udev event to be
processed before calling partprobe.  This helps prevent partprobe
from getting a resource busy error on some platforms.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
(cherry picked from commit 9eda8e5d5abf0743a2ad484806cfb2018243515f)

src/ceph-disk

index 81dbd840cc9d876779704954928bfe54d65705bd..df5706a79224b8bc519f1845e2011616a3fc7b8c 100755 (executable)
@@ -666,6 +666,14 @@ def prepare_journal_dev(
                 journal,
                 ],
             )
+        subprocess.check_call(
+            args=[
+                # wait for udev event queue to clear
+                'udevadm',
+                'settle',
+                '--timeout=10',
+                ],
+            )
         subprocess.check_call(
             args=[
                 # also make sure the kernel refreshes the new table
@@ -845,6 +853,14 @@ def prepare_dev(
                     data,
                     ],
                 )
+            subprocess.check_call(
+                args=[
+                    # wait for udev event queue to clear
+                    'udevadm',
+                    'settle',
+                    '--timeout=10',
+                    ],
+                )
             subprocess.check_call(
                 args=[
                     # also make sure the kernel refreshes the new table
@@ -916,6 +932,14 @@ def prepare_dev(
                     data,
                     ],
                 )
+            subprocess.check_call(
+                args=[
+                    # wait for udev event queue to clear
+                    'udevadm',
+                    'settle',
+                    '--timeout=10',
+                    ],
+                )
             subprocess.check_call(
                 args=[
                     # also make sure the kernel refreshes the new table