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

Multi-termination Cable Trace: Interfaces are randomly swapped #14241

Closed
uedvt359 opened this issue Nov 10, 2023 · 6 comments · Fixed by #14750
Closed

Multi-termination Cable Trace: Interfaces are randomly swapped #14241

uedvt359 opened this issue Nov 10, 2023 · 6 comments · Fixed by #14750
Assignees
Labels
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

@uedvt359
Copy link

uedvt359 commented Nov 10, 2023

NetBox version

v3.6.5

Python version

3.11

Steps to Reproduce

this is reproducible on demo.netbox.dev

1: Create 3 devices (names and interfaces obviously don't matter, but these are the ones in the screenshots):

  • server (nms)
  • switch-old (dist) with interface 65
  • switch-new (spine) with interface 1:10

2: connect server to both switches:

  • nms -> dist
  • spine -> nms

3: do a cable trace

Expected Behavior

the interface of switch-old (dist) should be displayed above switch-old and same for switch-new (spine)

Observed Behavior

depending on the order in which the terminations were added on the multi-side, the interfaces might be flipped around. it can be "fixed" by removing one of the terminations, saving and re-adding it (if it doesn't work, remove the other one).

flipped:
image

after the remove-and-readd workaround:
image

https://demo.netbox.dev/dcim/interfaces/1802/trace/

Tasks

Preview Give feedback
No tasks being tracked yet.
@uedvt359 uedvt359 added the type: bug A confirmed report of unexpected behavior in the application label Nov 10, 2023
@abhi1693
Copy link
Member

I don't believe this is a bug just an nuance that there is no ordering in place to keep the display same every time the page is opened

@uedvt359
Copy link
Author

look again closely at the two bottom items: dist is always on the left, but the associated interface changes!

@DanSheps DanSheps added severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation labels Nov 10, 2023
@DanSheps DanSheps self-assigned this Nov 10, 2023
@DanSheps
Copy link
Member

I will try and take a stab at this this weekend

@DanSheps
Copy link
Member

Took a look at this a bit, probably won't be an easy fix and might need a bit of a rewrite to the svg draw code.

@Moehritz
Copy link

Moehritz commented Jan 9, 2024

I took a stab at this as well as #13922, they are related. I fixed both.

Currently device objects, terminations and cables are drawn separately with no linking them if they appear out of order, I built an extended testcase for that which highlights both issues:
image
(rear2 is actually connected to et1h1 of s02)

Updated Version looks like this:
image
If number of interfaces align, there will only be straight lines as before.

If it is okay for you I will submit my changes as a PR for review for you @DanSheps. Are there additional test-cases that I should do manually (verifying rendered SVG for some data) for changes in the renderer?

@jeremystretch
Copy link
Member

Thanks @Moehritz, I'll take a look!

DanSheps added a commit that referenced this issue Apr 23, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
Development

Successfully merging a pull request may close this issue.

5 participants