|
|
a56a5e |
From 4c2d48d5c4449789018024c3d9f402f5108e9a68 Mon Sep 17 00:00:00 2001
|
|
|
966cef |
From: Harald Hoyer <harald@redhat.com>
|
|
|
966cef |
Date: Mon, 31 Mar 2014 16:21:49 +0200
|
|
|
966cef |
Subject: [PATCH] fcoe: workaround fcoe timing issues
|
|
|
966cef |
|
|
|
966cef |
---
|
|
|
966cef |
modules.d/95fcoe/fcoe-genrules.sh | 2 +-
|
|
|
966cef |
modules.d/95fcoe/fcoe-up.sh | 23 ++++++++++++++++++++---
|
|
|
966cef |
2 files changed, 21 insertions(+), 4 deletions(-)
|
|
|
966cef |
|
|
|
966cef |
diff --git a/modules.d/95fcoe/fcoe-genrules.sh b/modules.d/95fcoe/fcoe-genrules.sh
|
|
|
966cef |
index 80894ed..fa3af6d 100755
|
|
|
966cef |
--- a/modules.d/95fcoe/fcoe-genrules.sh
|
|
|
966cef |
+++ b/modules.d/95fcoe/fcoe-genrules.sh
|
|
|
966cef |
@@ -13,4 +13,4 @@
|
|
|
966cef |
else
|
|
|
966cef |
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"
|
|
|
966cef |
fi
|
|
|
966cef |
-} > /etc/udev/rules.d/92-fcoe.rules
|
|
|
966cef |
+} >> /etc/udev/rules.d/92-fcoe.rules
|
|
|
966cef |
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
|
|
966cef |
index 60642cf..edbfcc8 100755
|
|
|
966cef |
--- a/modules.d/95fcoe/fcoe-up.sh
|
|
|
966cef |
+++ b/modules.d/95fcoe/fcoe-up.sh
|
|
|
966cef |
@@ -39,10 +39,27 @@ if [ "$dcb" = "dcb" ]; then
|
|
|
966cef |
sleep 1
|
|
|
966cef |
i=$(($i+1))
|
|
|
966cef |
done
|
|
|
966cef |
- dcbtool sc "$netif" dcb on
|
|
|
966cef |
- sleep 1
|
|
|
966cef |
- dcbtool sc "$netif" app:fcoe e:1 a:1 w:1
|
|
|
966cef |
+
|
|
|
966cef |
+ # on some systems lldpad needs some time
|
|
|
966cef |
+ # sleep until we find a better solution
|
|
|
966cef |
+ sleep 30
|
|
|
966cef |
+
|
|
|
966cef |
+ while [ $i -lt 60 ]; do
|
|
|
966cef |
+ dcbtool sc "$netif" dcb on && break
|
|
|
966cef |
+ info "Retrying to turn dcb on"
|
|
|
966cef |
+ sleep 1
|
|
|
966cef |
+ i=$(($i+1))
|
|
|
966cef |
+ done
|
|
|
966cef |
+
|
|
|
966cef |
+ while [ $i -lt 60 ]; do
|
|
|
966cef |
+ dcbtool sc "$netif" app:fcoe e:1 a:1 w:1 && break
|
|
|
966cef |
+ info "Retrying to turn fcoe on"
|
|
|
966cef |
+ sleep 1
|
|
|
966cef |
+ i=$(($i+1))
|
|
|
966cef |
+ done
|
|
|
966cef |
+
|
|
|
966cef |
sleep 1
|
|
|
966cef |
+
|
|
|
966cef |
fipvlan "$netif" -c -s
|
|
|
966cef |
elif [ "$netdriver" = "bnx2x" ]; then
|
|
|
966cef |
# If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|