While doing connection interfaces "maximum recursion depth exceeded" #2121

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

Originally created by @a31amit on GitHub (Nov 13, 2018).

Environment

  • Python version: 3.7.1
  • NetBox version: develop-2.5 [ Netbox 2.5 Develop Branch ]

Steps to Reproduce

  1. Create a Device without any interfaces or ports
  2. Create Rear Port - R[1-5]
  3. Create Front Port - F[1-5] and select Rear Port for them
  4. Try to make the connection for F1 to R1 or vice versa

Expected Behavior

either make the connection without problem or some validation should be there to prevent a failure of request.

Observed Behavior

This cause a recurrsion issue in netbox. Also After opening new window, I can see that cable was created and showing connected to interface but there is no data in changelog for particular cable.

Traceback log is also attached
netbox-2.5-develop-recursion bug.txt

Request Method: POST
Request URL: http://${NETBOX_SERVER}:8080/dcim/front-ports/7/connect/
Django Version: 2.1.3
Exception Type: RecursionError
Exception Value: maximum recursion depth exceeded while calling a Python object

Exception Location: /opt/netboxd/python37/lib/python3.7/site-packages/django/db/models/expressions.py in getstate, line 157

Python Executable: /opt/netboxd/python37/bin/python
Python Version: 3.7.1

Originally created by @a31amit on GitHub (Nov 13, 2018). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.7.1 * NetBox version: develop-2.5 [ Netbox 2.5 Develop Branch ] <!-- Describe in detail the steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). --> ### Steps to Reproduce 1. Create a Device without any interfaces or ports 2. Create Rear Port - R[1-5] 3. Create Front Port - F[1-5] and select Rear Port for them 4. Try to make the connection for F1 to R1 or vice versa <!-- What did you expect to happen? --> ### Expected Behavior either make the connection without problem or some validation should be there to prevent a failure of request. <!-- What happened instead? --> ### Observed Behavior This cause a recurrsion issue in netbox. Also After opening new window, I can see that cable was created and showing connected to interface but there is no data in changelog for particular cable. Traceback log is also attached [netbox-2.5-develop-recursion bug.txt](https://github.com/digitalocean/netbox/files/2574110/netbox-2.5-develop-recursion.bug.txt) Request Method: POST Request URL: http://${NETBOX_SERVER}:8080/dcim/front-ports/7/connect/ Django Version: 2.1.3 Exception Type: RecursionError Exception Value: maximum recursion depth exceeded while calling a Python object Exception Location: /opt/netboxd/python37/lib/python3.7/site-packages/django/db/models/expressions.py in __getstate__, line 157 Python Executable: /opt/netboxd/python37/bin/python Python Version: 3.7.1
adam added the type: bugstatus: accepted labels 2025-12-29 17:22:27 +01:00
adam closed this issue 2025-12-29 17:22:27 +01:00
Author
Owner

@lampwins commented on GitHub (Nov 13, 2018):

The main issue here is that this should not be allowed in the first place. There is no reason to connect a Front Port to its responding Rear Port. They are already mapped together by way of the Front Port. In the real world, this would be nothing more than a closed loop on a patch panel.

@lampwins commented on GitHub (Nov 13, 2018): The main issue here is that this should not be allowed in the first place. There is no reason to connect a Front Port to its responding Rear Port. They are already mapped together by way of the Front Port. In the real world, this would be nothing more than a closed loop on a patch panel.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2121