Assigning a cable termination to multiple front-ports on multiple devices raises an AssertionError #6730

Closed
opened 2025-12-29 19:44:34 +01:00 by adam · 12 comments
Owner

Originally created by @jsenecal on GitHub (Jul 28, 2022).

NetBox version

v3.3-beta1

Python version

3.8

Steps to Reproduce

  1. Populate NetBox with what is required to create a device and at least an interface (Manufacturer, Device Type, Sites, etc).
  2. 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).
  3. Create two patch-panel like devices ("device1", "device2"), each having a front/rear port pair.
  4. Create a "device3" with at least one interface
  5. Connect the interface of device3 to the two front ports of devices 1 and 2
  6. 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.

Originally created by @jsenecal on GitHub (Jul 28, 2022). ### NetBox version v3.3-beta1 ### Python version 3.8 ### Steps to Reproduce 1. Populate NetBox with what is required to create a device and at least an interface (Manufacturer, Device Type, Sites, etc). 2. 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). 3. Create two patch-panel like devices ("device1", "device2"), each having a front/rear port pair. 4. Create a "device3" with at least one interface 5. Connect the interface of device3 to the two front ports of devices 1 and 2 6. 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.
adam added the type: bugstatus: under review labels 2025-12-29 19:44:34 +01:00
adam closed this issue 2025-12-29 19:44:35 +01:00
Author
Owner

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

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.

@jeremystretch commented on GitHub (Aug 2, 2022): 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.
Author
Owner

@sdktr commented on GitHub (Aug 5, 2022):

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'?

@sdktr commented on GitHub (Aug 5, 2022): > 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'?
Author
Owner

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

A rear port with positions set to a value greater than 1.

@jeremystretch commented on GitHub (Aug 5, 2022): A rear port with `positions` set to a value greater than 1.
Author
Owner

@jsenecal commented on GitHub (Aug 5, 2022):

Example for use-case:
https://github.com/netbox-community/netbox/issues/9139#issuecomment-1122478520

@jsenecal commented on GitHub (Aug 5, 2022): Example for use-case: https://github.com/netbox-community/netbox/issues/9139#issuecomment-1122478520
Author
Owner

@Jorcha commented on GitHub (Aug 29, 2022):

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/

@Jorcha commented on GitHub (Aug 29, 2022): 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/
Author
Owner

@jsenecal commented on GitHub (Sep 20, 2022):

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...

@jsenecal commented on GitHub (Sep 20, 2022): > 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...
Author
Owner

@Jorcha commented on GitHub (Sep 22, 2022):

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:

  1. 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/)
  2. Create four front ports to "Fiber panel AtoB" and map them to rear ports
    (https://demo.netbox.dev/dcim/devices/107/front-ports/)
  3. 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/)
  4. Create four front ports to "Fiber panel BtoA" and map them to rear ports
    (https://demo.netbox.dev/dcim/devices/108/front-ports/)
  5. Map all ports between AtoB and BtoA (three connections: two single ones and one splice)
  6. Create two "switches" having atleast two normal interfaces (https://demo.netbox.dev/dcim/devices/109/interfaces/ & https://demo.netbox.dev/dcim/devices/110/interfaces/)
  7. Connect switch 1 from first interface to first two front ports of AtoB fiber panel
  8. Connect switch 1 from second interface to next two front ports of AtoB fiber panel
  9. Repeat same to switch 2 and BtoA fiber panel.

poc-cable-splice
poc-cable-single
single-v330-error

@Jorcha commented on GitHub (Sep 22, 2022): 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: 1. 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/) 2. Create four front ports to "Fiber panel AtoB" and map them to rear ports (https://demo.netbox.dev/dcim/devices/107/front-ports/) 3. 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/) 4. Create four front ports to "Fiber panel BtoA" and map them to rear ports (https://demo.netbox.dev/dcim/devices/108/front-ports/) 5. Map all ports between AtoB and BtoA (three connections: two single ones and one splice) 6. Create two "switches" having atleast two normal interfaces (https://demo.netbox.dev/dcim/devices/109/interfaces/ & https://demo.netbox.dev/dcim/devices/110/interfaces/) 7. Connect switch 1 from first interface to first two front ports of AtoB fiber panel 8. Connect switch 1 from second interface to next two front ports of AtoB fiber panel 9. Repeat same to switch 2 and BtoA fiber panel. ![poc-cable-splice](https://user-images.githubusercontent.com/16294936/191742207-82921bec-0b87-481a-91d0-1babe716fb38.svg) <img width="658" alt="poc-cable-single" src="https://user-images.githubusercontent.com/16294936/191743042-b8e8ae99-11ab-4585-a776-7e2f7d9b9539.png"> <img width="884" alt="single-v330-error" src="https://user-images.githubusercontent.com/16294936/191747767-c5e2786e-b744-4258-be8b-50f547659286.png">
Author
Owner

@Jorcha commented on GitHub (Sep 23, 2022):

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")

Problem-Cabling

@Jorcha commented on GitHub (Sep 23, 2022): 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") ![Problem-Cabling](https://user-images.githubusercontent.com/16294936/191904593-42c903b4-3b5b-4b00-840c-dae005f35978.png)
Author
Owner

@craized commented on GitHub (Oct 13, 2022):

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

Interface_to_Separate_Tx_and_Rx_Strands

+1 for getting this fixed, or I'm happy to create that new FR

@craized commented on GitHub (Oct 13, 2022): > 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 ![Interface_to_Separate_Tx_and_Rx_Strands](https://user-images.githubusercontent.com/499818/195686953-2b8e7f0a-d3c4-402a-a1b1-2cff2e4d798b.png) +1 for getting this fixed, or I'm happy to create that new FR
Author
Owner

@github-actions[bot] commented on GitHub (Dec 13, 2022):

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.

@github-actions[bot] commented on GitHub (Dec 13, 2022): 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](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jsenecal commented on GitHub (Jan 3, 2023):

I wasn't able to replicate the original issue anymore - Closing

@jsenecal commented on GitHub (Jan 3, 2023): I wasn't able to replicate the original issue anymore - Closing
Author
Owner

@jsenecal commented on GitHub (Jan 3, 2023):

@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!

@jsenecal commented on GitHub (Jan 3, 2023): @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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6730