Assigning a cable termination to multiple front-ports on multiple devices raises an AssertionError
NetBox version
v3.3-beta1
Python version
3.8
Steps to Reproduce
- Populate NetBox with what is required to create a device and at least an interface (Manufacturer, Device Type, Sites, etc).
- Populate NetBox with what is required to create two patch-panel like devices with at least one front port and one rear port (Manufacturer, Device Type, etc).
- Create two patch-panel like devices ("device1", "device2"), each having a front/rear port pair.
- Create a "device3" with at least one interface
- Connect the interface of device3 to the two front ports of devices 1 and 2
- AssertionError
Expected Behavior
The cable should be created and split the cable trace when everything gets connected (rear ports, etc).
Observed Behavior
A AssertionError exception is raised.
This occurs only when at least one of the mapped rear ports has multiple positions. We don't currently handle a case where a cable splits across multiple multi-position rear ports.
This occurs only when at least one of the mapped rear ports has multiple positions. We don't currently handle a case where a cable splits across multiple multi-position rear ports.
What is a 'multi-position rear port'?
A rear port with positions set to a value greater than 1.
Example for use-case: https://github.com/netbox-community/netbox/issues/9139#issuecomment-1122478520
I have single position rear ports and having problems to create one interface to two front ports.
I managed to replicate my problem into demo instance too: https://demo.netbox.dev/dcim/interfaces/2278/trace/
gle position rear ports and having problems to create one interface to two front ports.
Unfortunately the demo instance resets quite often.
Would you be able to document the steps here @Jorcha ? It may very well be a different issue...
Sure. At this time I got different result while I tested next setup in demo instance v3.3.4! It seemed to work okay while using two position splice (cable trace shows right result see attachment) but single position cabling seems to have issues to find out path to remote.. If I click node below Path Split text I get no path found message (see another attachment)
When testing in our own v3.3.0 version, if I have single cable to single front port to single position rear port everything is ok, if I add second one position front port to same interface I will get "must have rear port" error (see 3rd attachement) BUT now two connections from interface to front ports linked to two position rear port seems to work fine! (I think my previous test had some kind of demo effect involved)
How to create simple demo setup:
- Create "Fiber panel AtoB" device with two single position rear ports and one two position rear port for testing (https://demo.netbox.dev/dcim/devices/107/rear-ports/)
- Create four front ports to "Fiber panel AtoB" and map them to rear ports (https://demo.netbox.dev/dcim/devices/107/front-ports/)
- Create another "Fiber panel BtoA" device with two single position rear ports and one two position rear port for testing (https://demo.netbox.dev/dcim/devices/108/rear-ports/)
- Create four front ports to "Fiber panel BtoA" and map them to rear ports (https://demo.netbox.dev/dcim/devices/108/front-ports/)
- Map all ports between AtoB and BtoA (three connections: two single ones and one splice)
- Create two "switches" having atleast two normal interfaces (https://demo.netbox.dev/dcim/devices/109/interfaces/ & https://demo.netbox.dev/dcim/devices/110/interfaces/)
- Connect switch 1 from first interface to first two front ports of AtoB fiber panel
- Connect switch 1 from second interface to next two front ports of AtoB fiber panel
- Repeat same to switch 2 and BtoA fiber panel.

Quick small testing more about Path Split:
If I do connection illustrated in attachment I will get path split. I think if I have two fiber patch panels connected together with multi position cabling cable trace has issues to find remote device. (Terminology issue in attachment! Instead Switch there should text "Interface")

This occurs only when at least one of the mapped rear ports has multiple positions. We don't currently handle a case where a cable splits across multiple multi-position rear ports.
I don't know if I should open a new FR for this, or just provide a use case that makes the current behavior a "bug".
I have a number of dark fiber circuits that use a Tx MUX + Rx MUX (Or single Tx/Rx MUX going to two strands) terminating in a single interface that unfortunately can't be modeled due to this limitation.
Side note, FR would ideally include specifying Tx/Rx direction on the connection but for this implementation I would just set the cable label to include this info

+1 for getting this fixed, or I'm happy to create that new FR
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
I wasn't able to replicate the original issue anymore - Closing
@Jorcha your issue is still relevant but would require a new one to be opened as it is different from the one I originally opened.
Thanks!