[2.1] netaddr raises IndexError when looking up some OUI registrations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
LaMont Jones | ||
2.1 |
Fix Released
|
Critical
|
Unassigned | ||
maas (Ubuntu) |
In Progress
|
Undecided
|
MAAS Maintainers |
Bug Description
Distro: Ubuntu 16.10
MAAS version: 2.1.2+bzr5555-
For some node MAC addresses (I have a relatively old servers) I am unable to open MAAS dashboard page or Nodes page due to
"list index out of range"
error.
2017-01-
2017-01-
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
return target()
File "/usr/lib/
task()
File "/usr/lib/
task()
--- <exception caught here> ---
File "/usr/lib/
result = inContext.theWork()
File "/usr/lib/
inContext.
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
return func_outside_
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/usr/lib/
return super(MachineHa
File "/usr/lib/
for obj in objs
File "/usr/lib/
for obj in objs
File "/usr/lib/
return self.dehydrate(obj, data, for_list=for_list)
File "/usr/lib/
obj, data, for_list=for_list)
File "/usr/lib/
data[
File "/usr/lib/
return get_vendor_
File "/usr/lib/
return data.oui.
File "/usr/lib/
return OUI(self.value >> 24)
File "/usr/lib/
self.
File "/usr/lib/
record['org'] = line.split(None, 2)[2]
builtins.
For now I have worked around the issue by catching IndexError in "/usr/lib/
But this probably needs some investigation and fix - without the workaround I cannot use MAAS.
Related branches
- Mike Pontillo (community): Approve
-
Diff: 35 lines (+16/-1)2 files modifiedsrc/maasserver/utils/mac.py (+3/-1)
src/maasserver/utils/tests/test_mac.py (+13/-0)
- LaMont Jones (community): Approve
-
Diff: 35 lines (+16/-1)2 files modifiedsrc/maasserver/utils/mac.py (+3/-1)
src/maasserver/utils/tests/test_mac.py (+13/-0)
description: | updated |
Changed in maas (Ubuntu): | |
status: | New → In Progress |
Changed in maas: | |
status: | New → In Progress |
Changed in maas (Ubuntu): | |
assignee: | nobody → MAAS Maintainers (maas-maintainers) |
Changed in maas: | |
assignee: | nobody → LaMont Jones (lamont) |
milestone: | none → 2.2.0 |
importance: | Undecided → Critical |
summary: |
- List index out of range on main page and nodes page + [2.1] List index out of range on main page and nodes page |
summary: |
- [2.1] List index out of range on main page and nodes page + [2.1] netaddr raises IndexError when looking up some OUIs |
summary: |
- [2.1] netaddr raises IndexError when looking up some OUIs + [2.1] netaddr raises IndexError when looking up some OUI registrations |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Can you provide the first 3 octets of one of the bad MACs? If you're not sure which one, the following is sure to catch it:
sudo maas-region dbshell cast(mac_ address as varchar) for 8) from maasserver_ interface;
select distinct substring(
This would appear to be a bug in the python3-netaddr, which MAAS should probably armor itself against.