Detect infinite loop in cable paths #10151

Closed
opened 2025-12-29 21:27:33 +01:00 by adam · 2 comments
Owner

Originally created by @bctiemann on GitHub (Aug 28, 2024).

Deployment Type

NetBox Cloud

NetBox Version

v4.0.9

Python Version

3.10

Steps to Reproduce

Currently it is possible to create an infinite loop in cabling topology (for instance, a Device with Interface -> Patch Panel Front Port -> Patch Panel Rear Port). This causes CablePath.from_origin to loop infinitely while trying to resolve the termination path.

Create Cable connections as follows:

Device (DA): Application Server, APC AP7901
Create Interface 01 (fixed Ethernet)

Patch Panel (PA): Generic 48-pair fiber panel

Device (DA) [Interface]
        | (Cable 1)
PatchPanel (PA) Front Port 1
PatchPanel (PA) Front Port 2
        | (Cable 2)
PatchPanel (PA) Rear Splice

(Issue also occurs if you create a Rear Port 1 on PA and connect Front Port 2 to Rear Port 1.)

When creating the Cable 2 object, clicking Save leads to an infinitely spinning/wedged browser as the app continuously iterates.

Expected Behavior

Cable should be created. If the cable path is not valid, the trace diagram should not be expected to redraw correctly.

Observed Behavior

Cable object fails to save, or is partially saved, while the from_origin method iterates infinitely. User has to refresh the browser and the app potentially suffers degraded performance while the session survives.

Originally created by @bctiemann on GitHub (Aug 28, 2024). ### Deployment Type NetBox Cloud ### NetBox Version v4.0.9 ### Python Version 3.10 ### Steps to Reproduce Currently it is possible to create an infinite loop in cabling topology (for instance, a Device with Interface -> Patch Panel Front Port -> Patch Panel Rear Port). This causes `CablePath.from_origin` to loop infinitely while trying to resolve the termination path. Create Cable connections as follows: Device (DA): Application Server, APC AP7901 Create Interface 01 (fixed Ethernet) Patch Panel (PA): Generic 48-pair fiber panel ``` Device (DA) [Interface] | (Cable 1) PatchPanel (PA) Front Port 1 PatchPanel (PA) Front Port 2 | (Cable 2) PatchPanel (PA) Rear Splice ``` (Issue also occurs if you create a Rear Port 1 on PA and connect Front Port 2 to Rear Port 1.) When creating the Cable 2 object, clicking Save leads to an infinitely spinning/wedged browser as the app continuously iterates. ### Expected Behavior Cable should be created. If the cable path is not valid, the trace diagram should not be expected to redraw correctly. ### Observed Behavior Cable object fails to save, or is partially saved, while the `from_origin` method iterates infinitely. User has to refresh the browser and the app potentially suffers degraded performance while the session survives.
adam closed this issue 2025-12-29 21:27:34 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Apr 24, 2025):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Apr 24, 2025): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (May 25, 2025):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (May 25, 2025): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10151