napalm
napalm copied to clipboard
EOS napalm=4.0.0 get_bgp_neighbors() returning error for Arista 7050CX3M
Description of Issue/Question
Note: Please check https://guides.github.com/features/mastering-markdown/ to see how to properly format your request.
get_bgp_neighbors() is returning
AttributeError: 'NoneType' object has no attribute 'group'
when run on Arista DCS-7050CX3M-32S-F platform. We also tested Arista DCS-7050TX-64-F but we are not seeing this error there. It looks like a platform specific napalm bug.
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an x
between the square brackets where applicable)
- [X] Yes
- [] No
Setup
napalm version
(Paste verbatim output from pip freeze | grep napalm
between quotes below)
(olympus_nqa_napalm_bug) ➜ ~ pip freeze | grep napalm
napalm==4.0.0
Network operating system version
(Paste verbatim output from show version
- or equivalent - between quotes below)
nqa3-7050CX3M-32S-E10A-36.15:52:25#show version
Arista DCS-7050CX3M-32S-F
Hardware version: 11.20
Serial number: JPE21315205
Hardware MAC address: 2cdd.e99b.f677
System MAC address: 2cdd.e99b.f677
Software image version: 4.27.2F-DPE
Architecture: i686
Internal build version: 4.27.2F-DPE-26069621.4272F
Internal build ID: d3ac3428-f798-4904-aed2-20e36661c487
Image format version: 2.0
Image optimization: DPE
Uptime: 1 week, 0 days, 18 hours and 1 minute
Total memory: 8147140 kB
Free memory: 5472420 kB
Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)
device.get_bgp_neighbors()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/olympus_nqa/Device.py", line 525, in get_bgp_neighbors
return executor()
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/olympus_nqa/Device.py", line 172, in _run
return getattr(self.device, method)(*args, **kwargs)
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/napalm/eos/eos.py", line 748, in get_bgp_neighbors
"remote_as": napalm.base.helpers.as_number(neighbor_info.group("as")),
AttributeError: 'NoneType' object has no attribute 'group'
Any updates?
@vaderisback77 It is probably better to create a fix and submit a pull-request on it (then waiting for someone to help you).
One of the BGP blocks we're seeing is
BGP neighbor is 111.1.3.1, remote AS 31898, external link
BGP version 4, remote router ID 111.1.3.1, VRF VPN-DRG-2557
BGP state is Established, up for 5d00h
IPv4 Unicast: 0 0 0 0
IPv6 Unicast: 0 0 0 0
Local AS is 60000, local router ID 111.1.3.0
IPv4 Unicast: 111.1.3.0
The existing eos code does not seem to expect/handle IPv4 Unicast: 111.1.3.0
line
@vaderisback77 It is probably better to create a fix and submit a pull-request on it (then waiting for someone to help you).
Thanks.
@vaderisback77 It is probably better to create a fix and submit a pull-request on it (then waiting for someone to help you).
I will have the bug fix PR out shortly.
Submitted PR: https://github.com/napalm-automation/napalm/pull/1746
It looks like the root cause is additional information in the BGP neighborship output:
Local next hop for next hop self:
IPv4 Unicast: missing (cannot send updates with next hop self)
IPv6 Unicast: fe80::a8c1:abff:fe61:5688
Closed by #1746