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