Error while trying to bulk import modules after deleting them ( I mean modules that had the same values) #8164

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

Originally created by @roys10 on GitHub (Jun 6, 2023).

NetBox version

v3.3.4

Python version

3.10

Steps to Reproduce

  1. create a module
  2. delete it
  3. try to create the same module with bulk import

Expected Behavior

A new module attached to the given device and module bay is created.

Observed Behavior

Server Error - <class 'django.db.utils.integrityError'>

duplicate key value violates unique constraint "dcim_interface_device_id_name_bffc4ec4_uniq"
DETAIL: Key (device_id, name)=(, ) already exists.

Originally created by @roys10 on GitHub (Jun 6, 2023). ### NetBox version v3.3.4 ### Python version 3.10 ### Steps to Reproduce 1. create a module 2. delete it 3. try to create the same module with bulk import ### Expected Behavior A new module attached to the given device and module bay is created. ### Observed Behavior Server Error - <class 'django.db.utils.integrityError'> duplicate key value violates unique constraint "dcim_interface_device_id_name_bffc4ec4_uniq" DETAIL: Key (device_id, name)=(<an id>, <interface name>) already exists.
adam closed this issue 2025-12-29 20:33:17 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Jun 6, 2023):

Cannot replicate this on 3.5.3. The replication steps are missing the csv or json for the import as well. The replication steps are also missing creation instructions for the objects in use. Also it seems like you edited the error message.

This is such a long way from being an actionable bug report that I'll close it. Feel free to edit it with proper replication steps for the current version of netbox and ping me, then I'll re-open it.

What is likely happening here is that when deleting the module for some reason you didn't remove all the interfaces on the device, causing one of the interfaces that the module provides still being present on the target device.

@kkthxbye-code commented on GitHub (Jun 6, 2023): Cannot replicate this on 3.5.3. The replication steps are missing the csv or json for the import as well. The replication steps are also missing creation instructions for the objects in use. Also it seems like you edited the error message. This is such a long way from being an actionable bug report that I'll close it. Feel free to edit it with proper replication steps for the current version of netbox and ping me, then I'll re-open it. What is likely happening here is that when deleting the module for some reason you didn't remove all the interfaces on the device, causing one of the interfaces that the module provides still being present on the target device.
Author
Owner

@roys10 commented on GitHub (Jun 6, 2023):

Cannot replicate this on 3.5.3. The replication steps are missing the csv or json for the import as well. The replication steps are also missing creation instructions for the objects in use. Also it seems like you edited the error message.

This is such a long way from being an actionable bug report that I'll close it. Feel free to edit it with proper replication steps for the current version of netbox and ping me, then I'll re-open it.

What is likely happening here is that when deleting the module for some reason you didn't remove all the interfaces on the device, causing one of the interfaces that the module provides still being present on the target device.

Hey sorry about the poor replication steps. I checked to see if after I deleted the modules there were still interfaces of the module, but there aren't any.

@roys10 commented on GitHub (Jun 6, 2023): > Cannot replicate this on 3.5.3. The replication steps are missing the csv or json for the import as well. The replication steps are also missing creation instructions for the objects in use. Also it seems like you edited the error message. > > This is such a long way from being an actionable bug report that I'll close it. Feel free to edit it with proper replication steps for the current version of netbox and ping me, then I'll re-open it. > > What is likely happening here is that when deleting the module for some reason you didn't remove all the interfaces on the device, causing one of the interfaces that the module provides still being present on the target device. Hey sorry about the poor replication steps. I checked to see if after I deleted the modules there were still interfaces of the module, but there aren't any.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8164