Multiple prefix deletion via pagination causes "RecursionError" #5391

Closed
opened 2025-12-29 19:27:25 +01:00 by adam · 1 comment
Owner

Originally created by @WillIrvine on GitHub (Sep 19, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.12

Python version

3.7

Steps to Reproduce

  1. Create /24 Prefix (10.10.0.0/24, No VRF)
    image

  2. Create 200 /32 Prefixes within that subnet
    image

  3. Ensure Pagination is set to below the number of prefixes so that the bulk select menu is triggered (mine is set to 50)

  4. Go to parent prefix (10.10.0.0/24). Select all prefixes within /24 prefix and "Delete all"
    image

  5. Recursion error is seen
    image

Expected Behavior

Expected the selected prefixes within the parent prefix to be deleted

Observed Behavior

A RecursionError results and selected prefixes marked for removal remain

Cases where this does not happen

-Adding IP Addresses to the same parent prefix and removing in the same way (through pagination) does not cause an issue
-Removing the prefixes when Pagination is set higher than the number of prefixes for removal does not cause an issue, suggesting that the issue lies in the pagination logic

Originally created by @WillIrvine on GitHub (Sep 19, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.12 ### Python version 3.7 ### Steps to Reproduce 1. Create /24 Prefix (10.10.0.0/24, No VRF) ![image](https://user-images.githubusercontent.com/32685892/133912607-718993f4-7d96-4abe-88a2-f711d2a36100.png) 2. Create 200 /32 Prefixes within that subnet ![image](https://user-images.githubusercontent.com/32685892/133912599-40902b31-8c2b-4ba8-9953-eded4d020dd6.png) 3. Ensure Pagination is set to below the number of prefixes so that the bulk select menu is triggered (mine is set to 50) 4. Go to parent prefix (10.10.0.0/24). Select all prefixes within /24 prefix and "Delete all" ![image](https://user-images.githubusercontent.com/32685892/133912644-746e2a44-7d70-43df-a8d2-939323247a5d.png) 5. Recursion error is seen ![image](https://user-images.githubusercontent.com/32685892/133912654-6f28614b-5615-424f-b647-8fa9bf4374b0.png) ### Expected Behavior Expected the selected prefixes within the parent prefix to be deleted ### Observed Behavior A RecursionError results and selected prefixes marked for removal remain **Cases where this does not happen** -Adding IP Addresses to the same parent prefix and removing in the same way (through pagination) does not cause an issue -Removing the prefixes when Pagination is set higher than the number of prefixes for removal does not cause an issue, suggesting that the issue lies in the pagination logic
adam added the type: bugstatus: accepted labels 2025-12-29 19:27:25 +01:00
adam closed this issue 2025-12-29 19:27:25 +01:00
Author
Owner

@WillIrvine commented on GitHub (Sep 19, 2021):

This was tested on v2.11.12 with Python 3.6.8, however i can replicate the same issue on the demo instance running v3.0.2

@WillIrvine commented on GitHub (Sep 19, 2021): This was tested on v2.11.12 with Python 3.6.8, however i can replicate the same issue on the demo instance running v3.0.2
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5391