[Fai-commit] r6572 - branches/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Mon Jun 6 17:44:12 UTC 2011


Author: mt
Date: 2011-06-06 17:44:12 +0000 (Mon, 06 Jun 2011)
New Revision: 6572

Added:
   branches/experimental/patches/setup-storage_udevsettle-before-vol-id
Modified:
   branches/experimental/patches/series
Log:
setup-storage: make sure udev is ready before calling fai-vol_id


Modified: branches/experimental/patches/series
===================================================================
--- branches/experimental/patches/series	2011-06-05 21:42:01 UTC (rev 6571)
+++ branches/experimental/patches/series	2011-06-06 17:44:12 UTC (rev 6572)
@@ -20,3 +20,4 @@
 setup-storage_syntax-check-mode
 setup-storage_softraid-assemble-error
 setup-storage_align-first-part-preserve
+setup-storage_udevsettle-before-vol-id

Added: branches/experimental/patches/setup-storage_udevsettle-before-vol-id
===================================================================
--- branches/experimental/patches/setup-storage_udevsettle-before-vol-id	                        (rev 0)
+++ branches/experimental/patches/setup-storage_udevsettle-before-vol-id	2011-06-06 17:44:12 UTC (rev 6572)
@@ -0,0 +1,24 @@
+2011-06-06  Michael Tautschnig  <mt at debian.org>
+
+	* setup-storage/Fstab.pm: call udevsettle before reading volume id to avoid
+		race condition.
+Index: trunk/lib/setup-storage/Fstab.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Fstab.pm
++++ trunk/lib/setup-storage/Fstab.pm
+@@ -100,6 +100,7 @@
+   # write the device name as the first entry; if the user prefers uuids
+   # or labels, use these if available
+   my @uuid = ();
++  `$FAI::udev_settle`;
+   &FAI::execute_ro_command(
+     "fai-vol_id -u $device_name", \@uuid, 0);
+ 
+@@ -113,6 +114,7 @@
+   # get the label -- this is likely empty; exit code 3 if no label, but that is
+   # ok here
+   my @label = ();
++  `$FAI::udev_settle`;
+   &FAI::execute_ro_command(
+     "fai-vol_id -l $device_name", \@label, 0);
+ 




More information about the Fai-commit mailing list