dainok / netdoc

Automatic Network Documentation plugin for NetBox
GNU General Public License v3.0
89 stars 14 forks source link

Issue when Update IPAM from ARP tables #108

Closed dietybright closed 10 months ago

dietybright commented 10 months ago

I am facing issue when run script update IPAM from ARP tables, interface has no IP address due to HA standby state, but it still able having arp table, causing script error. Appreciated if we can ignore it.

1 Failure
IP address not found on interface xxx, maybe some ingestion script has failed 2 Failure
An exception occurred: AttributeError: 'NoneType' object has no attribute 'address' Traceback (most recent call last): File "/opt/netbox/netbox/extras/scripts.py", line 504, in _run_script script.output = script.run(data=data, commit=commit) File "/opt/netbox/netbox/scripts/netdoc_scripts.py", line 443, in run .address.prefixlen AttributeError: 'NoneType' object has no attribute 'address' 3 Info
Database changes have been reverted due to error.

dainok commented 10 months ago

Seems fine: I will ignore ARP if no IP address is set at interface level. To be honest I won't ingest ARP into the database, because we have ARP from active node also. What do you think?

dietybright commented 10 months ago

Yes, we should ignore ARP if no IP address is set at interface level, those ARP will be import on active node

dainok commented 10 months ago

@dietybright see https://github.com/dainok/netdoc/pull/109