summaryrefslogtreecommitdiffstats
path: root/daemon/guestfsd.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-10-11 17:12:21 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-10-11 17:12:21 +0100
commit15b9ed3ed2078c034f25bf3ba31298dd89c6cddf (patch)
treec73067d0650997ff902da6caa95f8300d2fea735 /daemon/guestfsd.c
parent67e9572286f98b830bef64cfcae5a072bf3a1882 (diff)
downloadlibguestfs-15b9ed3ed2078c034f25bf3ba31298dd89c6cddf.tar.gz
libguestfs-15b9ed3ed2078c034f25bf3ba31298dd89c6cddf.tar.xz
libguestfs-15b9ed3ed2078c034f25bf3ba31298dd89c6cddf.zip
daemon: Call udev-settle at the start of the daemon.
Diffstat (limited to 'daemon/guestfsd.c')
-rw-r--r--daemon/guestfsd.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 487662f2..5c848497 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -269,6 +269,17 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
+ /* Wait for udev devices to be created. If you start libguestfs,
+ * especially with disks that contain complex (eg. mdadm) data
+ * already, then it is possible for the 'mdadm' and LVM commands
+ * that the init script runs to have not completed by the time the
+ * daemon starts executing library commands. (This is very rare and
+ * hard to test however, but we have seen it in 'brew'). Run
+ * udev_settle, but do it as late as possible to minimize the chance
+ * that we'll have to do any waiting here.
+ */
+ udev_settle ();
+
/* Send the magic length message which indicates that
* userspace is up inside the guest.
*/