|
|
966cef |
From 17445cb35ff2f626ccde07de61106bbcd6d0b268 Mon Sep 17 00:00:00 2001
|
|
|
966cef |
From: Harald Hoyer <harald@redhat.com>
|
|
|
966cef |
Date: Tue, 25 Mar 2014 15:28:19 +0100
|
|
|
966cef |
Subject: [PATCH] fcoe: wait for lldpad to be ready
|
|
|
966cef |
|
|
|
966cef |
https://bugzilla.redhat.com/show_bug.cgi?id=1080353
|
|
|
966cef |
---
|
|
|
966cef |
modules.d/95fcoe/fcoe-up.sh | 10 ++++++++--
|
|
|
966cef |
modules.d/95fcoe/module-setup.sh | 2 +-
|
|
|
966cef |
2 files changed, 9 insertions(+), 3 deletions(-)
|
|
|
966cef |
|
|
|
966cef |
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
|
|
|
966cef |
index ecb1593..60642cf 100755
|
|
|
966cef |
--- a/modules.d/95fcoe/fcoe-up.sh
|
|
|
966cef |
+++ b/modules.d/95fcoe/fcoe-up.sh
|
|
|
966cef |
@@ -31,8 +31,14 @@ if [ "$dcb" = "dcb" ]; then
|
|
|
966cef |
# are to kill it and start a new lldpad to take over. Data is transfered
|
|
|
966cef |
# between the 2 using a shm segment
|
|
|
966cef |
lldpad -d
|
|
|
966cef |
- # stupid tools, need sleep
|
|
|
966cef |
- sleep 1
|
|
|
966cef |
+ # wait for lldpad to be ready
|
|
|
966cef |
+ i=0
|
|
|
966cef |
+ while [ $i -lt 60 ]; do
|
|
|
966cef |
+ lldptool -p && break
|
|
|
966cef |
+ info "Waiting for lldpad to be ready"
|
|
|
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 |
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
|
|
966cef |
index fe8e40a..3ffaf5a 100755
|
|
|
966cef |
--- a/modules.d/95fcoe/module-setup.sh
|
|
|
966cef |
+++ b/modules.d/95fcoe/module-setup.sh
|
|
|
966cef |
@@ -20,7 +20,7 @@ installkernel() {
|
|
|
966cef |
}
|
|
|
966cef |
|
|
|
966cef |
install() {
|
|
|
966cef |
- inst_multiple ip dcbtool fipvlan lldpad readlink
|
|
|
966cef |
+ inst_multiple ip dcbtool fipvlan lldpad readlink lldptool
|
|
|
966cef |
|
|
|
966cef |
mkdir -m 0755 -p "$initdir/var/lib/lldpad"
|
|
|
966cef |
|