networktocode / network-importer

The network importer is a tool/library to analyze and/or synchronize an existing network with a Network Source of Truth (SOT), it's designed to be idempotent and by default it's only showing the difference between the running network and the remote SOT.
Other
169 stars 42 forks source link

Arista EOS: Inconsistent Results for VLAN - CLI vs Config #287

Open jvanderaa opened 1 year ago

jvanderaa commented 1 year ago

Environment

Steps to Reproduce

  1. Setup an Arista device
  2. Configure some VLAN interfaces and L2 VLANs
  3. Onboard the VLANs

Relevant Device Configuration

hostname dc1-spine01
!
spanning-tree mode mstp
!
no aaa root
!
username admin privilege 15 role network-admin secret sha512 $6$/2ahlpMNIqeutSHN$BaGxR5MONIE9q0lIlVYk.MaNdbye.dq4BDGPz.BuZs/9DXi3avfzdoWDENKawx0tXHr1urZrOLbjRRevbbwLX0
!
vlan 2000
   name TEST
!
vlan 2001
!
interface Ethernet1
!
interface Ethernet2
   switchport access vlan 2000
!
interface Ethernet3
   switchport access vlan 2001
!
interface Ethernet4
!
interface Ethernet5
!
interface Ethernet6
!
interface Ethernet7
!
interface Ethernet8
!
interface Ethernet9
!
interface Ethernet10
!
interface Ethernet11
!
interface Ethernet12
!
interface Management1
   ip address 198.51.100.4/26
!
interface Vlan2088
!
no ip routing
!
ip route 0.0.0.0/0 198.51.100.1
!
management api http-commands
   no shutdown
!
management api gnmi
   transport grpc default
!
end

Expected Behavior

Consistent Onboarding

Observed Behavior

CLI Onboarding

site
  site: msp
    vlan
      vlan: msp__2088 MISSING in Network
device
  device: dc1-spine01
    interface
      interface: Ethernet2
        access_vlan    Network(msp__2000)    Nautobot(None)
      interface: Ethernet3
        access_vlan    Network(msp__2001)    Nautobot(None)
2022-11-21 23:37:12,804 - network-importer - INFO - Execution finished, processed 1 device(s)

Config Onboarding

site
  site: msp
    vlan
      vlan: msp__2000 MISSING in Nautobot
      vlan: msp__2001 MISSING in Nautobot
device
  device: dc1-spine01
    interface
      interface: Ethernet2
        access_vlan    Network(msp__2000)    Nautobot(None)
      interface: Ethernet3
        access_vlan    Network(msp__2001)    Nautobot(None)
jvanderaa commented 1 year ago

I believe that the config onboarding is the accurate one and CLI one is the one that needs to get updated. Likely caused by https://github.com/networktocode/network-importer/blob/develop/network_importer/drivers/arista_eos.py#L29

jvanderaa commented 1 year ago

I just did a test run with NAPALM get_vlans getter. Everything is checking out fine there. So the link of the issue previously is not the culprit.

The real interesting thing that I'm looking at on this is that the site VLAN is different than the device interface VLAN assignment.