56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
|
From 3c530fc528d61ea2701dfb46ccd90e218a6d8aef Mon Sep 17 00:00:00 2001
|
||
|
From: Harald Hoyer <harald@redhat.com>
|
||
|
Date: Mon, 31 Mar 2014 16:21:49 +0200
|
||
|
Subject: [PATCH] fcoe: workaround fcoe timing issues
|
||
|
|
||
|
---
|
||
|
modules.d/95fcoe/fcoe-genrules.sh | 2 +-
|
||
|
modules.d/95fcoe/fcoe-up.sh | 23 ++++++++++++++++++++---
|
||
|
2 files changed, 21 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/modules.d/95fcoe/fcoe-genrules.sh b/modules.d/95fcoe/fcoe-genrules.sh
|
||
|
index 80894ed..fa3af6d 100755
|
||
|
--- a/modules.d/95fcoe/fcoe-genrules.sh
|
||
|
+++ b/modules.d/95fcoe/fcoe-genrules.sh
|
||
|
@@ -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
|
||
|
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
||
|
index dd45358..d8c73c8 100755
|
||
|
--- a/modules.d/95fcoe/fcoe-up.sh
|
||
|
+++ b/modules.d/95fcoe/fcoe-up.sh
|
||
|
@@ -36,10 +36,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
|