You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a device already has interfaces with no MAC set (e.g. device type template interfaces) netbox-agent bails out. It seems it can't find the interface because it's searching by mac&name. I think it should be searching by device&name since this is enough to uniquely identify interfaces.
Expected behavior
MAC address should be updated for existing interfaces.
Configuration file
N/A
Environment:
N/A
Additional context
This is the patch I applied to get it to work for me. This probably breaks other stuff but at least shows what I mean.
The MAC of bond interfaces can change at every boot or network restart, because the bond takes the MAC of the first slave interface (which is prone to race conditions during interface startup). Also the MAC of the subsequent slave interfaces gets changed to be the MAC of the bond. So it would be great if the netbox-agent could update MAC addresses of interfaces.
For this, I could prepare a PR based on the patch submitted in this issue.
Additionally, I think it would be preferable to store the permanent MAC address of physical interfaces for inventory purposes.
But it seems that the output of lshw provides the current MAC address as serial number and not the permanent MAC address.
One option would be to pick the permanent MAC address from the output of ethtool -P and use it as serial, instead of the serial provided by lshw.
Another option would be to add the permanent MAC address to the description of the inventory item, so that at least the user could find the inventory item when searching by the permanent MAC address.
Also linking the inventory item representing the NIC to the logical NIC object would be useful.
Describe the bug
If a device already has interfaces with no MAC set (e.g. device type template interfaces) netbox-agent bails out. It seems it can't find the interface because it's searching by mac&name. I think it should be searching by device&name since this is enough to uniquely identify interfaces.
Expected behavior
MAC address should be updated for existing interfaces.
Configuration file
N/A
Environment:
N/A
Additional context
This is the patch I applied to get it to work for me. This probably breaks other stuff but at least shows what I mean.
The text was updated successfully, but these errors were encountered: