Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect infinite loop in cable paths #17292

Open
bctiemann opened this issue Aug 28, 2024 · 0 comments · May be fixed by #17293
Open

Detect infinite loop in cable paths #17292

bctiemann opened this issue Aug 28, 2024 · 0 comments · May be fixed by #17293
Assignees
Labels
netbox severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation topic: cabling type: bug A confirmed report of unexpected behavior in the application

Comments

@bctiemann
Copy link
Contributor

bctiemann commented 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.

@bctiemann bctiemann added type: bug A confirmed report of unexpected behavior in the application status: needs triage This issue is awaiting triage by a maintainer status: accepted This issue has been accepted for implementation topic: cabling severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Aug 28, 2024
@jeremystretch jeremystretch added the netbox label Nov 1, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
netbox severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation topic: cabling type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
2 participants