[rhel7-branch 1/1] Ignore interfaces with invalid VLAN IDs.

dashea installerbot-noreply at redhat.com
Tue Oct 27 21:58:59 UTC 2015


From: David Shea <dshea at redhat.com>

There are some special cases of interface names where something follows
the VLAN ID, such as -fcoe. We can't interact with these via
NetworkManager so raise SettingsNotFound instead.

Resolves: rhbz#1274893
---
 pyanaconda/nm.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index 745775a..dc624aa 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -634,7 +634,16 @@ def _device_settings(name):
         if not settings:
             # connections generated by NM from iBFT
             _parent, _sep, vlanid = name.partition(".")
-            settings = _find_settings(int(vlanid), 'vlan', 'id')
+
+            # If we are not able to convert the VLAN id to an int this
+            # is probably a FCoE interface and we're not going to be able
+            # to do much with it.
+            try:
+                vlanid = int(vlanid)
+            except ValueError:
+                return None
+
+            settings = _find_settings(vlanid, 'vlan', 'id')
     else:
         settings = _find_settings(name, 'connection', 'interface-name')
         if not settings:


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/f0f626fed672448caffc84f718e24d1a6cbd89d9


More information about the anaconda-patches mailing list