scaleway / netbox-netprod-importer

Poll data from network devices in production and import it into netbox
GNU General Public License v3.0
101 stars 31 forks source link

MTU unlimited on Junos MX204 #35

Closed i4networks closed 4 years ago

i4networks commented 4 years ago

ERROR: netbox_importer: Error when polling device junipermx204 : Interface dsc could not be created: 400 Client Error: Bad Request for url: http://localhost:8001/api/dcim/interfaces/88/ -- {'mtu': ['Ensure this value is greater than or equal to 1.']}

run show interfaces dsc Physical interface: dsc, Enabled, Physical link is Up Interface index: 5, SNMP ifIndex: 5 Type: Software-Pseudo, MTU: Unlimited Device flags : Present Running Interface flags: Point-To-Point SNMP-Traps Link flags : None Last flapped : Never Input packets : 0 Output packets: 0

aruhier commented 4 years ago

Hi, I don't really understand: how can the MTU be unlimited? It is a L2 or L3 interface, right?

i4networks commented 4 years ago

dsc is the discard interface.. equal to the cisco ios null0 interface used in routing to discard trafic

user@host# show routing-options static { route 192.0.2.101/32 discard; route 192.0.2.103/32 discard; route 192.0.2.105/32 discard; }

aruhier commented 4 years ago

Oh, I see. Ok, let me try something that should workaround this issue.

i4networks commented 4 years ago

cool 👍 , love to test it :)

aruhier commented 4 years ago

@i4networks: can you test the nullable_mtu branch please?

i4networks commented 4 years ago

@aruhier right away!

i4networks commented 4 years ago

./netbox-netprod-importer import -u 88888 -p -f /root/.config/netbox-netprod-importer/test.yml git clone -b nullable_mtu https://github.com/aruhier/netbox-netprod-importer.git ERROR: netbox_importer: Error when polling device mx204: Interface dsc could not be created: 400 Client Error: Bad Request for url: http://localhost:8001/api/dcim/interfaces/88/ -- {'mtu': ['Ensure this value is greater than or equal to 1.']}

aruhier commented 4 years ago

Ok, can you try it again please? I force-pushed a change.

i4networks commented 4 years ago

Hi @aruhier

Succes, MX204 created with no errors and dsc interface with empty MTU in netbox Thanx for the fix.

aruhier commented 4 years ago

Thanks.