Adding daisy-chained circuit results in Django error, and data added to database #2282

Closed
opened 2025-12-29 17:24:28 +01:00 by adam · 5 comments
Owner

Originally created by @oysteingy on GitHub (Jan 11, 2019).

Environment

  • Python version: 3.6.3
  • NetBox version: Example: 2.5.2

Steps to Reproduce

Thanks for all the good work that has been done to make Netbox such great software!

Unfortunately, we have some circuits that is daisy chained with another circuit like this:

Router A -> Patch Panel -> Circuit A -> Patch Panel -> Circuit B -> Patch Panel -> Router B

My co-worker tried to add a daisy chained circuit like this and it appears that the data was successfully inserted in the database as the cable trace shows the "correct" data with two circuits, yet upon connecting one of the circuits to a patch panel the data, Django throw an error:

ValueError at /netbox-test/circuits/circuit-terminations/1128/connect/

Cannot assign "<CircuitTermination: Side A>": "CircuitTermination.connected_endpoint" must be a "Interface" instance.

I tried to search on Github, Slack and the mailing list regarding this scenario with daisy chained circuits (there has to be other people with the same "problem") but I could not find any relevant hits at all.

If Netbox would permit this kind of daisy chained circuit that would be very good news for us.
I assume that it would require some modification to the UI ( rewrite "via CIRCUIT_VENDOR CIRCUIT_ID" to something like "via multiple circuits").

Expected Behavior

The error should be handled gracefully, and the data should preferably be inserted into the database without any error, or opposite ( gracefully handled error and no data insertion)

Observed Behavior

Django throws an error, but the data is apparently inserted correctly.

Originally created by @oysteingy on GitHub (Jan 11, 2019). ### Environment * Python version: 3.6.3 * NetBox version: Example: 2.5.2 ### Steps to Reproduce Thanks for all the good work that has been done to make Netbox such great software! Unfortunately, we have some circuits that is daisy chained with another circuit like this: Router A -> Patch Panel -> Circuit A -> Patch Panel -> Circuit B -> Patch Panel -> Router B My co-worker tried to add a daisy chained circuit like this and it appears that the data was successfully inserted in the database as the cable trace shows the "correct" data with two circuits, yet upon connecting one of the circuits to a patch panel the data, Django throw an error: ValueError at /netbox-test/circuits/circuit-terminations/1128/connect/ Cannot assign "<CircuitTermination: Side A>": "CircuitTermination.connected_endpoint" must be a "Interface" instance. I tried to search on Github, Slack and the mailing list regarding this scenario with daisy chained circuits (there has to be other people with the same "problem") but I could not find any relevant hits at all. If Netbox would permit this kind of daisy chained circuit that would be very good news for us. I assume that it would require some modification to the UI ( rewrite "via CIRCUIT_VENDOR CIRCUIT_ID" to something like "via multiple circuits"). ### Expected Behavior The error should be handled gracefully, and the data should preferably be inserted into the database without any error, or opposite ( gracefully handled error and no data insertion) ### Observed Behavior Django throws an error, but the data is apparently inserted correctly.
adam added the type: bugstatus: accepted labels 2025-12-29 17:24:28 +01:00
adam closed this issue 2025-12-29 17:24:28 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 11, 2019):

Please list the exact steps someone else can take to replicate the issue, including the creation of the devices, ports, and circuits.

@jeremystretch commented on GitHub (Jan 11, 2019): Please list the exact steps someone else can take to replicate the issue, including the creation of the devices, ports, and circuits.
Author
Owner

@oysteingy commented on GitHub (Jan 11, 2019):

I reproduced this 'problem' on a clean install of 2.5.2.

  • Create device types/roles, manufacturer, circuit providers etc.
  • Create site POP(1,2), Router(1,2), Circuit(1,2) and three patch panels
    The routers has a single physical interface, the patch panels has a rear and front port -- a bare-minimum of involved moving parts.

Start connecting:

Router1 -> FRONT--POP1PP1--REAR -> Circuit1 -> REAR--POP1PP_MR--FRONT -> Circuit2 -> REAR--POP2PP1.

The Django error comes when connecting first end of Circuit2 to the panel:

ValueError at /netbox-test/circuits/circuit-terminations/3/connect/

Cannot assign "<CircuitTermination: Side Z>": "CircuitTermination.connected_endpoint" must be a "Interface" instance.

However, the data is apparently still inserted as expected in the database as the cable trace displays 'correct' output -- see link.

https://imgur.com/a/l35LGtF

@oysteingy commented on GitHub (Jan 11, 2019): I reproduced this 'problem' on a clean install of 2.5.2. * Create device types/roles, manufacturer, circuit providers etc. * Create site POP(1,2), Router(1,2), Circuit(1,2) and three patch panels The routers has a single physical interface, the patch panels has a rear and front port -- a bare-minimum of involved moving parts. Start connecting: Router1 -> FRONT--POP1PP1--REAR -> Circuit1 -> REAR--POP1PP_MR--FRONT -> Circuit2 -> REAR--POP2PP1. The Django error comes when connecting first end of Circuit2 to the panel: ValueError at /netbox-test/circuits/circuit-terminations/3/connect/ Cannot assign "<CircuitTermination: Side Z>": "CircuitTermination.connected_endpoint" must be a "Interface" instance. However, the data is apparently still inserted as expected in the database as the cable trace displays 'correct' output -- see link. https://imgur.com/a/l35LGtF
Author
Owner

@fdebonneval commented on GitHub (May 9, 2019):

Hi there,
Got the same error on a v2.5.10 connecting a Circuit A or Z end to a rear port.

Thanks

@fdebonneval commented on GitHub (May 9, 2019): Hi there, Got the same error on a v2.5.10 connecting a Circuit A or Z end to a rear port. Thanks
Author
Owner

@Bill-Irvine commented on GitHub (Jul 10, 2019):

I too have run into this issue. Let me know if you need further feedback or testing completed.

@Bill-Irvine commented on GitHub (Jul 10, 2019): I too have run into this issue. Let me know if you need further feedback or testing completed.
Author
Owner

@jeremystretch commented on GitHub (Dec 9, 2019):

Looks like this is resolved in v2.6.8 by #3644. If you do encounter this in v2.6.8 or a later release, please open a new bug report including the exact steps that can be taken to reproduce the issue (and be sure to reference this one).

@jeremystretch commented on GitHub (Dec 9, 2019): Looks like this is resolved in v2.6.8 by #3644. If you do encounter this in v2.6.8 or a later release, please open a new bug report including the exact steps that can be taken to reproduce the issue (and be sure to reference this one).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2282