-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Cable Trace leads to "division by zero" if the last cable is not connected #17868
Comments
@knebb Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports. Can you please provide complete reproduction steps, something like:
|
Hi, I though it is indeed self explanatory. However; I will try again: Create a "switch" A with at least a single interface (switches usually have multiple...). Connect one interface from the switch A to rearport of B. Go to the "Interfaces" page of switch A. Select the "Trace" button of the interface you connected with the above steps. Go to devices and delete device C. Do NOT delete or edit the cables from above steps! Go again to the "Interfaces" page of the switch A. Klick on the "Trace" button again. Instead of showing the connected trace through B to the orphaned cable you will get no SVG graphic. Click on the Download SVG button and you will get an "Server error" with the "Division by zero" error I mentioned. I (And others) do not mind about the orphan cable. But it should show the SVG graph to the last connected device. Otherwise I am not able to track or trace where the connected interface of the switch ends. Hope it's clear now. |
This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically. |
@arthanson |
I was able to reproduce this on NetBox v4.1.7. Stack trace below.
|
Deployment Type
Self-hosted
Triage priority
N/A
NetBox Version
NetBox Community v4.1.3
Python Version
3.11
Steps to Reproduce
Have a switch (or similar) with an interface connected through multiple passive components (ie patchpanel, wall-plugs) to a device with an interface.
From switch, do cable trace on this interface - it will display all in-between interfaces (as expected).
Delete the device without deleting or disconnecting its cable will result in an unterminated cable (might be by design).
Trace the cable again from the switch interface.
Expected Behavior
I expect the cable trace to walk through until the last (unterminated) cable and show either the last device or the unterminated cable to trace down the still existing cables.
Observed Behavior
Results in an error without displaying any svg cable date:
The text was updated successfully, but these errors were encountered: