Skip to content

Interface query via API returns too many interfaces since v2.11.2 #6312

@cs-1

Description

@cs-1

NetBox version

v2.11.2

Python version

3.8

Steps to Reproduce

  1. Create at least two devices with the naming scheme "myname/1" and "myname/2" (number after "/" corresponds with the stack member ID in our case).
  2. Create a virtual chassis called "myname" and add devices "myname/1" and "myname/2" as members. Do not make one of the members a master.
  3. Query NetBox using the following GET request:
https://<netbox-server>/api/dcim/interfaces/?device=myname%2F1

Expected Behavior

In NetBox v2.11.1 the above query would produce only interface data of the VC member "myname/1".

Observed Behavior

After upgrading to v2.11.2 this produces the interfaces of all devices in the same virtual chassis despite none of the VC members being master. Please note that this query also produces all interfaces of all devices when querying "myname/2"'s interfaces.

We can clearly pin this on some change in v2.11.2. We used a VM snapshot of the v2.11.1 server to verify this and I can confirm that this behaviour was not present in v2.11.1.

Deleting the virtual chassis "myname" will immediately remedy this problem. So this is related to the fact that the devices are members of a virtual chassis.

This issue can be reproduced in Swagger.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions