Interface parent virtual chassis validation error #11536

Closed
opened 2025-12-29 21:46:31 +01:00 by adam · 4 comments
Owner

Originally created by @elipsion on GitHub (Aug 28, 2025).

Originally assigned to: @pheus on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.2.1

Python Version

3.11

Steps to Reproduce

  1. Create two devices (DevA, DevB)
  2. Join them in a virtual chassis
  3. Create an interface on DevA (IntA1)
  4. Create an interface on DevB (IntB1)
  5. Edit IntB1, set IntA1 as parent

Expected Behavior

IntB1 has IntA1 as parent.

Observed Behavior

Django throws an AttributeError from here.

<class 'AttributeError'>

'Interface' object has no attribute 'virtual_chassis'

Python version: 3.11.11
NetBox version: 4.2.1
Plugins: 
  netbox_bgp: 0.15.0
  netbox_dns: 1.2.0
Originally created by @elipsion on GitHub (Aug 28, 2025). Originally assigned to: @pheus on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.2.1 ### Python Version 3.11 ### Steps to Reproduce 1. Create two devices (`DevA`, `DevB`) 2. Join them in a virtual chassis 3. Create an interface on `DevA` (`IntA1`) 4. Create an interface on `DevB` (`IntB1`) 5. Edit `IntB1`, set `IntA1` as parent ### Expected Behavior `IntB1` has `IntA1` as parent. ### Observed Behavior Django throws an AttributeError from [here](https://github.com/netbox-community/netbox/blame/08ae1391618dad69866717681e79a56ad9414f80/netbox/dcim/models/device_components.py#L872). ``` <class 'AttributeError'> 'Interface' object has no attribute 'virtual_chassis' Python version: 3.11.11 NetBox version: 4.2.1 Plugins: netbox_bgp: 0.15.0 netbox_dns: 1.2.0 ```
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:46:31 +01:00
adam closed this issue 2025-12-29 21:46:31 +01:00
Author
Owner

@elipsion commented on GitHub (Aug 28, 2025):

Fix is likely changing self.parent.virtual_chassis to self.device.virtual_chassis.

@elipsion commented on GitHub (Aug 28, 2025): Fix is likely changing `self.parent.virtual_chassis` to `self.device.virtual_chassis`.
Author
Owner

@jnovinger commented on GitHub (Aug 28, 2025):

Thanks for the report, @elipsion ! Is this something you'd be interested in contributing a fix for?

Also, one note for future readers of this issue, it took me a moment to realize that Step 5 of the STR implies that IntB1 is of type Virtual.

@jnovinger commented on GitHub (Aug 28, 2025): Thanks for the report, @elipsion ! Is this something you'd be interested in contributing a fix for? Also, one note for future readers of this issue, it took me a moment to realize that Step 5 of the STR implies that `IntB1` is of type `Virtual`.
Author
Owner

@pheus commented on GitHub (Sep 12, 2025):

Thank you for the STR and pointer, and thanks for the note about Step 5 implying a Virtual interface.

If you don't have time to open a PR, I'm happy to take this on and submit one.
Could you please assign this issue to me?

@pheus commented on GitHub (Sep 12, 2025): Thank you for the STR and pointer, and thanks for the note about Step 5 implying a Virtual interface. If you don't have time to open a PR, I'm happy to take this on and submit one. Could you please assign this issue to me?
Author
Owner

@jnovinger commented on GitHub (Sep 12, 2025):

Thanks for volunteering, @pheus . All yours!

@jnovinger commented on GitHub (Sep 12, 2025): Thanks for volunteering, @pheus . All yours!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11536