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

Implement new mechanism for tracking end-to-end connections across cable paths #4900

Closed
jeremystretch opened this issue Jul 24, 2020 · 7 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Milestone

Comments

@jeremystretch
Copy link
Member

Proposed Changes

NetBox tracks end-to-end connections over pass-through ports. When a cable is saved, traces are done in both directions, and if a complete path has been established, the peer termination information is recorded at either of its endpoints.

This proposal seeks to devise and implement a new mechanism for tracking these end-to-end paths separately from the cable termination models. It may be desirable to introduce a new model (e.g. CablePath) dedicated to holding this information. Although more research is needed to identify the ideal solution, I've opened this issue now so that we can start referencing it as a blocker.

Justification

The association of end-to-end path data with specific device components and circuit terminations has proved problematic and inefficient (see the linked issues for examples).

@jeremystretch jeremystretch added type: housekeeping Changes to the application which do not directly impact the end user status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jul 24, 2020
@steffann steffann self-assigned this Sep 1, 2020
@jeremystretch
Copy link
Member Author

Although many of the details need to be refined, the high-level approach will be to model discrete cable paths individually for each connected object. For example, consider the following topology:

                1                           2
[Device 1] -----------+               +----------- [Device 2]
      Iface1          |               |          Iface2
                  FP1 |       3       | FP2
                  [Panel 1] ----- [Panel 2]
                  FP3 |   RP1   RP2   | FP4
      Iface3          |               |          Iface4
[Device 3] -----------+               +----------- [Device 4]
                4                           5

There are two end-to-end connections present, both via cable 3:

  • Iface 1 <---> Iface 2
  • Iface 3 <---> Iface 4

Currently, these connections are conveyed only on the four individual interfaces. A more robust approach would record each of the four unidirectional end-to-end connections individually, as:

  1. (Iface1, Cable 1, FP1, RP1, Cable 3, RP2, FP2, Cable 2, Iface2)
  2. (Iface2, Cable 2, FP2, RP2, Cable 3, RP1, FP1, Cable 1, Iface1)
  3. (Iface3, Cable 4, FP3, RP1, Cable 3, RP2, FP4, Cable 5, Iface4)
  4. (Iface4, Cable 5, FP4, RP2, Cable 3, RP1, FP3, Cable 4, Iface3)

This approach ensures that we can immediately query all potentially affected points along a path any time any single component within the path changes. For example, if cable 2 is deleted, we know immediately that paths 1 and 2 need to be updated.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Sep 29, 2020
@jeremystretch jeremystretch added this to the v2.10 milestone Sep 29, 2020
@steffann
Copy link
Contributor

I have experimented a bit with something similar: https://gist.github.com/steffann/b0cf1340fe0825bbffeba73822867d3b

Feel free to use!

@seismiccollision
Copy link

If reworking the path trace is planned I think it would also be useful to be able to make a logical connection between two end objects and then flesh out the front/rear ports to build the physical trace
I usually know what two things I intend to connect without knowing what patch panel path is free (or maybe the patch panels haven't been modeled yet) and then usually wait to model any of the connection until I know everything which hampers being able to take advantage of the logical connection when building configs

@bluikko
Copy link
Contributor

bluikko commented Nov 23, 2020

Are there plans to make trace work through circuits at some later time? We were relying on that feature in several locations. If the feature will not return then I guess we will need to re-work the data and somehow convert circuits to regular cables with some notes that those cables are actually circuits.

@oskaregils
Copy link

I understand that there are some major changes regarding circuits in rel 2.10
I am hoping for some fixes to what I feel lacking in my current version ( 2.8.1)

When viewing a circuit and in overview of each termination side A&Z on the right hand side of the screen.
The terminated device/interface is not always shown, sometimes only cable ID.
This depends on in what order things where registered in Netbox

When viewing a device interface it shows the far-end device it is connected to with a trace option.
I would be interested in seeing at a glance if (and hopefully then what) circuit is involved, with a globe icon for example.
This is for example the case if the interface is only terminated to a single side circuit. ( you get a globe icon and circuit ID)

Can the trace window flag/indicate circuit differently :-)
Pictures attached for clarity...

image
image
image

@bluikko
Copy link
Contributor

bluikko commented Nov 24, 2020

@oskaregils In 2.10 circuits will not be traversed by trace if I have understood correctly, from the release notes: "As part of this change, cable traces will no longer traverse circuits: A circuit termination will be considered the origin or destination of an end-to-end path." - if you feel that it should trace through circuits then please add a reaction to my post above #4900 (comment)

@jeremystretch
Copy link
Member Author

Please be aware that this issue is closed; no new work will be done under #4900. If you'd like to propose a change base on testing of the v2.10 beta, please do so by opening a new feature request.

Also note that no work will be done on v2.8: You'll need to upgrade to the latest v2.9 release.

@netbox-community netbox-community locked as resolved and limited conversation to collaborators Nov 24, 2020
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: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

No branches or pull requests

5 participants