[PATCH] Add support for recognizing BIOS EDD configured FCoE drives (#513018)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is the 2nd revision of this patch, which uses the final
location of the sysfs_edd.sh script, and adds the script to install.img .
---
 anaconda.spec.in     |    2 ++
 scripts/upd-instroot |    1 +
 storage/fcoe.py      |   19 ++++++++++++++++---
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/anaconda.spec.in b/anaconda.spec.in
index b1b044b..8b8aa4f 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -44,6 +44,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %define mehver 0.8
 %define sckeyboardver 1.3.1
 %define libblkid 2.17.1-1
+%define fcoeutilsver 1.0.12-2.20100323git
 
 BuildRequires: audit-libs-devel
 BuildRequires: bzip2-devel
@@ -145,6 +146,7 @@ Requires: NetworkManager >= %{nmver}
 Requires: dhclient
 Requires: anaconda-yum-plugins
 Requires: libselinux-python >= %{libselinuxver}
+Requires: fcoe-utils >= %{fcoeutilsver}
 %ifarch %{sparc}
 Requires: elftoaout piggyback
 %endif
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index beab423..5a1511e 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -592,6 +592,7 @@ usr/lib/yum-plugins/blacklist.py*
 usr/lib/yum-plugins/fedorakmod.py*
 usr/lib/yum-plugins/whiteout.py*
 usr/libexec/convertdb1
+usr/libexec/fcoe/sysfs_edd.sh
 usr/libexec/nm-crash-logger
 usr/libexec/nm-dhcp-client.action
 usr/libexec/nm-dispatcher.action
diff --git a/storage/fcoe.py b/storage/fcoe.py
index 2c785b3..e15bf24 100644
--- a/storage/fcoe.py
+++ b/storage/fcoe.py
@@ -19,6 +19,7 @@
 
 import os
 import iutil
+import isys
 import logging
 import time
 from flags import flags
@@ -73,6 +74,20 @@ class fcoe(object):
         if intf:
             w.pop()
 
+    def _startEDD(self, intf = None):
+        rc = iutil.execWithCapture("/usr/libexec/fcoe/sysfs_edd.sh", [ "-i" ],
+                                   stderr="/dev/tty5")
+        if not rc.startswith("NIC="):
+            log.info("No FCoE EDD info found: %s" % rc)
+            return
+
+        (key, val) = rc.split("=", 1)
+        if val not in isys.getDeviceProperties():
+            log.error("Unknown FCoE NIC found in EDD: %s, ignoring" % val)
+
+        log.info("FCoE NIC found in EDD: %s" % val)
+        self.addSan(val, dcb=True, intf=intf)
+
     def startup(self, intf = None):
         if self.started:
             return
@@ -80,9 +95,7 @@ class fcoe(object):
         if not has_fcoe():
             return
 
-        # Place holder for adding autodetection of FCoE setups based on
-        # firmware tables (like iBFT for iSCSI)
-
+        self._startEDD(intf)
         self.started = True
 
     def _startLldpad(self):
-- 
1.7.0

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux