]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fcoe: workaround fcoe timing issues
authorHarald Hoyer <harald@redhat.com>
Mon, 31 Mar 2014 14:21:49 +0000 (16:21 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Jul 2014 09:52:07 +0000 (11:52 +0200)
modules.d/95fcoe/fcoe-genrules.sh
modules.d/95fcoe/fcoe-up.sh

index 80894ed2d5c8f9955187ad2519c97cc85b5422ca..fa3af6df0c9cac78fce2a233a9895cf4cbc55ac0 100755 (executable)
@@ -13,4 +13,4 @@
     else
         printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb"
     fi
-} > /etc/udev/rules.d/92-fcoe.rules
+} >> /etc/udev/rules.d/92-fcoe.rules
index 60642cfdbf3f3a175958ed95098b96d4c0680c42..edbfcc84e950a58c390945a1419555588d830d32 100755 (executable)
@@ -39,10 +39,27 @@ if [ "$dcb" = "dcb" ]; then
         sleep 1
         i=$(($i+1))
     done
-    dcbtool sc "$netif" dcb on
-    sleep 1
-    dcbtool sc "$netif" app:fcoe e:1 a:1 w:1
+
+    # on some systems lldpad needs some time
+    # sleep until we find a better solution
+    sleep 30
+
+    while [ $i -lt 60 ]; do
+        dcbtool sc "$netif" dcb on && break
+        info "Retrying to turn dcb on"
+        sleep 1
+        i=$(($i+1))
+    done
+
+    while [ $i -lt 60 ]; do
+        dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 && break
+        info "Retrying to turn fcoe on"
+        sleep 1
+        i=$(($i+1))
+    done
+
     sleep 1
+
     fipvlan "$netif" -c -s
 elif [ "$netdriver" = "bnx2x" ]; then
     # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan