summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Lowell <glowell@inktank.com>2013-03-26 11:31:16 -0700
committerSage Weil <sage@inktank.com>2013-04-26 13:40:05 -0700
commit0113e5335e1552294bbf075cfff85c204b164e95 (patch)
tree16d4cfc89e3f737a3b96622e1241e48985a11738
parent02d48351f73330917185d8980f8ad123b99138b5 (diff)
downloadceph-0113e5335e1552294bbf075cfff85c204b164e95.tar.gz
ceph-disk: udevadm settle before partprobe
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)
-rwxr-xr-xsrc/ceph-disk24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index 81dbd840cc9..df5706a7922 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -668,6 +668,14 @@ def prepare_journal_dev(
)
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
'partprobe',
journal,
@@ -847,6 +855,14 @@ def prepare_dev(
)
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
'partprobe',
data,
@@ -918,6 +934,14 @@ def prepare_dev(
)
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
'partprobe',
data,