Skip to content

Commit

Permalink
Ignore interfaces with invalid VLAN IDs.
Browse files Browse the repository at this point in the history
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 return nothing instead of raising a ValueError, which
will cause SettingsNotFound to be raised instead.

Resolves: rhbz#1274893
  • Loading branch information
dashea committed Oct 28, 2015
1 parent 0830beb commit 74b1821
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pyanaconda/nm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 []

settings = _find_settings(vlanid, 'vlan', 'id')
else:
settings = _find_settings(name, 'connection', 'interface-name')
if not settings:
Expand Down

0 comments on commit 74b1821

Please sign in to comment.