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

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

Closed
DanSheps opened this issue Aug 30, 2022 · 2 comments · Fixed by #10227
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@DanSheps
Copy link
Member

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.
@DanSheps DanSheps added the type: bug A confirmed report of unexpected behavior in the application label Aug 30, 2022
@DanSheps DanSheps changed the title Single cable to multiple front-ports with separate rear-ports causes resolveable Single cable to multiple front-ports with separate rear-ports causes exception Aug 30, 2022
@DanSheps DanSheps changed the title Single cable to multiple front-ports with separate rear-ports causes exception Tracing single cable to multiple front-ports with separate rear-ports causes exception Aug 30, 2022
@DanSheps
Copy link
Member Author

DanSheps commented Aug 30, 2022

I have a diagram for clarity.

Not working:

Diagram

Working:

Diagram - Works

@jeremystretch
Copy link
Member

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 jeremystretch self-assigned this Aug 31, 2022
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Aug 31, 2022
jeremystretch added a commit that referenced this issue Aug 31, 2022
Fixes #10217: Handle exception when trace splits to multiple rear ports
jeremystretch added a commit that referenced this issue Aug 31, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants