Skip to content

IP Address list API showing duplicate objects when using VRFs and duplicate IPs #5345

@tyler-8

Description

@tyler-8

Environment

  • Python version: v3.6.8
  • NetBox version: v2.9.9

Steps to Reproduce

  1. Create 10 VRFs
  2. Create the IP address 5.5.5.5/32 10 times, using one of the 10 VRFs each time
  3. Do a GET on /api/ipam/ip-addresses/?limit=2&offset=0 and record the IDs of each IP address (list or Counter object)
  4. Increase the offset by 2 (or follow the next URL) and record all IDs.
  5. Count the number of times each ID appears in the full dataset

Expected Behavior

A list of 10 unique IP address objects.

Observed Behavior

Object/IDs appears more than once (more IPs = more duplicates). I tested this on v2.8.8 using a more expansive dataset (hundreds of thousands of IPs giving several thousand duplicated objects) as well as a fresh clean install of v2.9.9 using the above steps and getting 1 duplicate object.

[Edit] I forgot to mention that this is causing data to be missing. Using the above steps, one of those 10 IPs will be missing from the list as it's "overwritten" by the duplicate.

Based on a few past issues that were for related problems, I'm guessing that vrf may need to be added to the ordering attribute but haven't verified that myself.

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