Editing Device Type interfaces causes issue with pre-created devices #1928

Closed
opened 2025-12-29 17:20:39 +01:00 by adam · 3 comments
Owner

Originally created by @DavidAkroyd on GitHub (Aug 9, 2018).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.4.1 upgraded to 2.4.2

Steps to Reproduce

Create a new Device type without Network interfaces
Create a device in that device type
Add network interfaces to device
Add network interfaces to device type
("Update" device to device-type)

Expected Behavior

Devices would add new interfaces for device type

Observed Behavior

Device does not receive new interfaces

Additionally, can no longer delete the device receiving error message:
<class 'dcim.models.DoesNotExist'> Device matching query does not exist.

To solve, must delete interfaces from created device, and then can delete the device

Originally created by @DavidAkroyd on GitHub (Aug 9, 2018). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.5.2 * NetBox version: 2.4.1 upgraded to 2.4.2 <!-- Describe in detail the steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). --> ### Steps to Reproduce Create a new Device type without Network interfaces Create a device in that device type Add network interfaces to device Add network interfaces to device type ("Update" device to device-type) <!-- What did you expect to happen? --> ### Expected Behavior Devices would add new interfaces for device type <!-- What happened instead? --> ### Observed Behavior Device does not receive new interfaces Additionally, can no longer delete the device receiving error message: `<class 'dcim.models.DoesNotExist'> Device matching query does not exist.` To solve, must delete interfaces from created device, and then can delete the device
adam closed this issue 2025-12-29 17:20:39 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 9, 2018):

Device does not receive new interfaces

This is desired behavior as explained in the documentation.

Additionally, can no longer delete the device receiving error message:

I'm not able to replicate this following the steps you posted above. Please post the exact steps someone else can take to reproduce the bug, beginning with the creation of a new device type.

@jeremystretch commented on GitHub (Aug 9, 2018): > Device does not receive new interfaces This is desired behavior as explained in [the documentation](http://netbox.readthedocs.io/en/stable/core-functionality/devices/). > Additionally, can no longer delete the device receiving error message: I'm not able to replicate this following the steps you posted above. Please post the _exact_ steps someone else can take to reproduce the bug, beginning with the creation of a new device type.
Author
Owner

@DavidAkroyd commented on GitHub (Aug 9, 2018):

The steps I took were in 2.4.1

I created a Device type (Machine) with no network interfaces
I created multiple devices of this type (Mac1)
I added a network interface (Intel) to Mac1 and added an IP address and connection
I added network interfaces to the device type
I bulk changed devices Mac1-50 to include a tenant and also selected the device type

I was then unable to delete the device (Mac1) which already had a network connection, receiving the error message as indicated above

However repeating the same steps in 2.4.2 directly no longer appears to cause the same issue, so I am unsure if this then was fixed as part of 2.4.2 indirectly. The issue appears to be related to https://github.com/digitalocean/netbox/issues/2323 though there is no mention of this being fixed also for non-virtual machines

@DavidAkroyd commented on GitHub (Aug 9, 2018): The steps I took were in 2.4.1 I created a Device type (Machine) with no network interfaces I created multiple devices of this type (Mac1) I added a network interface (Intel) to Mac1 and added an IP address and connection I added network interfaces to the device type I bulk changed devices Mac1-50 to include a tenant and also selected the device type I was then unable to delete the device (Mac1) which already had a network connection, receiving the error message as indicated above However repeating the same steps in 2.4.2 directly no longer appears to cause the same issue, so I am unsure if this then was fixed as part of 2.4.2 indirectly. The issue appears to be related to https://github.com/digitalocean/netbox/issues/2323 though there is no mention of this being fixed also for non-virtual machines
Author
Owner

@jeremystretch commented on GitHub (Aug 9, 2018):

Yep, looks like the same bug that was fixed in v2.4.2.

@jeremystretch commented on GitHub (Aug 9, 2018): Yep, looks like the same bug that was fixed in v2.4.2.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1928