netbox-ssot icon indicating copy to clipboard operation
netbox-ssot copied to clipboard

[Bug] VMware/ESX Vlans are not synchronized

Open n-rodriguez opened this issue 9 months ago • 11 comments

Hi there!

It seems that Vlans are not synchronized (not tagged with netbox-ssot), only the DefaultVlanGroup are created/updated.

nicolas@MacBook-Pro-de-Nicolas:~/go/src/github.com/n-rodriguez/netbox-ssot$ grep 'Vlan ' foo.log
2025/02/27 20:45:06 rest.go:66          DEBUG   (inventory): Getting all objects.Vlan from Netbox
2025/02/27 20:45:06 rest.go:69          DEBUG   (inventory): Getting objects.Vlan with limit=250 and offset=0
2025/02/27 20:45:06 add_items.go:906    DEBUG   (inventory): Vlan FooDefaultVlanGroup already exists in Netbox and is up to date...
2025/02/27 20:45:06 add_items.go:906    DEBUG   (inventory): Vlan FooDefaultVlanGroup already exists in Netbox and is up to date...
2025/02/27 20:45:06 add_items.go:906    DEBUG   (inventory): Vlan BarDefaultVlanGroup already exists in Netbox and is up to date...
2025/02/27 20:45:06 add_items.go:906    DEBUG   (inventory): Vlan BarDefaultVlanGroup already exists in Netbox and is up to date...

Thank you!

n-rodriguez avatar Feb 28 '25 00:02 n-rodriguez

Hello on which source are you trying the following log? Vlans are collected and synced in many places. I would need more info here.

bl4ko avatar Feb 28 '25 07:02 bl4ko

@bl4ko Hi there! What do you need to know?

n-rodriguez avatar Mar 05 '25 20:03 n-rodriguez

How to reproduce vlans not being synchronized?

bl4ko avatar Mar 06 '25 08:03 bl4ko

Good question ^^ Actually vlans were first synchronized with netbox-sync (they have the netbox-sync tags) and I was expecting for the tag to change (like other objects). So I would say :

  1. synchronize with netbox-sync
  2. synchronize with netbox-ssot

n-rodriguez avatar Mar 06 '25 13:03 n-rodriguez

So if I understand correctly, If you filter vlans with netbox-ssot tag, there are no matches in netbox (after netbox-ssot sync)?

bl4ko avatar Mar 07 '25 09:03 bl4ko

So if I understand correctly, If you filter vlans with netbox-ssot tag, there are no matches in netbox (after netbox-ssot sync)?

right

n-rodriguez avatar Mar 07 '25 14:03 n-rodriguez

I found an other issue with Vlans : vlans are stored in vlanIDMap with vlanID as key. But I think it should also take nic in consideration.

Image

Right now it picks and creates the first it founds.

On the top of that it also assigns a default vlan group which prevents creation of different vlan with the same ID on the same site.

n-rodriguez avatar Mar 07 '25 23:03 n-rodriguez

@bl4ko hi there! any news?

n-rodriguez avatar Mar 25 '25 22:03 n-rodriguez

Hi, I've just been very busy lately... vlans are stored by their group and their vlan id see. Because I think in netbox if you add to vlans with the same vlanID they must be scoped to either different vlan group or different site. Scoping only to interface won't work...

bl4ko avatar Mar 26 '25 20:03 bl4ko

they must be scoped to either different vlan group or different site

Right. Right now it's not possible because vlans are automatically scoped to vlan group.

n-rodriguez avatar Mar 26 '25 22:03 n-rodriguez

Scoping only to interface won't work...

Right, you can't.

n-rodriguez avatar Mar 26 '25 22:03 n-rodriguez