Tracing single cable to multiple front-ports with separate rear-ports causes exception #6910

Closed
opened 2025-12-29 19:46:35 +01:00 by adam · 2 comments
Owner

Originally created by @DanSheps on GitHub (Aug 30, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.3.1

Python version

3.10

Steps to Reproduce

  1. Create Site
  2. Create Device Role
  3. Create Device Type for switch (at least 1 interface)
  4. Create Device Type for patch panel (at least 2 rear ports with 1 position each connected to 2 front ports)
  5. Create 2 Devices for patch panel
  6. Create 1 Device for switch
  7. Connect interface on switch to 2 front ports
  8. Connect rear ports on patch panel 1 to rear ports on patch panel 2
  9. Attempt a trace

Expected Behavior

Trace completes successfully

Observed Behavior

Trace fails with exception:

ValueError at /dcim/interfaces/2374/trace/
Cannot query "<FrontPort on Panel 1>": Must be "RearPort" instance.
Request Method:	GET
Request URL:	http://127.0.0.1:8000/dcim/interfaces/2374/trace/
Django Version:	4.0.7
Exception Type:	ValueError
Exception Value:	
Cannot query "<FrontPort on Panel 1>": Must be "RearPort" instance.
Originally created by @DanSheps on GitHub (Aug 30, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.3.1 ### Python version 3.10 ### Steps to Reproduce 1. Create Site 2. Create Device Role 3. Create Device Type for switch (at least 1 interface) 4. Create Device Type for patch panel (at least 2 rear ports with 1 position each connected to 2 front ports) 5. Create 2 Devices for patch panel 6. Create 1 Device for switch 7. Connect interface on switch to 2 front ports 8. Connect rear ports on patch panel 1 to rear ports on patch panel 2 9. Attempt a trace ### Expected Behavior Trace completes successfully ### Observed Behavior Trace fails with exception: ``` ValueError at /dcim/interfaces/2374/trace/ Cannot query "<FrontPort on Panel 1>": Must be "RearPort" instance. Request Method: GET Request URL: http://127.0.0.1:8000/dcim/interfaces/2374/trace/ Django Version: 4.0.7 Exception Type: ValueError Exception Value: Cannot query "<FrontPort on Panel 1>": Must be "RearPort" instance. ```
adam added the type: bugstatus: accepted labels 2025-12-29 19:46:35 +01:00
adam closed this issue 2025-12-29 19:46:35 +01:00
Author
Owner

@DanSheps commented on GitHub (Aug 30, 2022):

I have a diagram for clarity.

Not working:

Diagram

Working:

Diagram - Works

@DanSheps commented on GitHub (Aug 30, 2022): I have a diagram for clarity. Not working: ![Diagram](https://user-images.githubusercontent.com/11049792/187531275-2bcc9707-0429-4a52-907b-8056e35832f3.PNG) Working: ![Diagram - Works](https://user-images.githubusercontent.com/11049792/187532262-d73548aa-38a3-4d3f-b6df-3a2d98a5ebba.PNG)
Author
Owner

@jeremystretch commented on GitHub (Aug 31, 2022):

To be clear, tracing across the first topology is not supported as the path splits across multiple cables. However, tracing in this situation should inform the user of a split path and present options for continuing the trace, rather than raising an exception.

@jeremystretch commented on GitHub (Aug 31, 2022): To be clear, tracing across the first topology is not supported as the path splits across multiple cables. However, tracing in this situation should inform the user of a split path and present options for continuing the trace, rather than raising an exception.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6910