netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Other VC device interfaces not showing up when bulk-editing/Edit selected

Open Azmodeszer opened this issue 1 year ago • 1 comments

Deployment Type

Self-hosted

NetBox Version

v3.7.6

Python Version

3.10

Steps to Reproduce

  1. Create a Virtual Chassis, add two or more devices, each with at least one physical interface.
  2. Create LAG1 on device1, LAG2 on device2.
  3. Bulk edit existing interfaces on device2 (although simply using "Edit selected" on a single interface is enough) and try to select LAG1 as LAG interface.
  4. Try the same with device1/LAG2.

Expected Behavior

No matter which particular device the interface belongs to, all LAGs show up in the dropdown menu since they're part of the same VC. And indeed that's how it works when directly editing an interface.

Observed Behavior

Only LAG1/2 shows up when editing (an) interface(s) native to device1/2. (seems to apply to all kinds of Related Interfaces, not just LAGs)

Azmodeszer avatar Apr 28 '24 17:04 Azmodeszer

Thanks for the bug report. I was able to reproduce it in the lab.

jeffgdotorg avatar Apr 29 '24 21:04 jeffgdotorg

When editing a single interface, the list of candidate LAG interfaces is fetched by filtering with virtual_chassis_member_id, which matches all interfaces assigned to the VC. When bulk editing, the device_id filter is used instead; this matches only interfaces belonging to the local device. We can tweak the bulk edit form to filter by the former filter if the device is a VC member.

jeremystretch avatar May 03 '24 13:05 jeremystretch