Two devices with same name at different sites fails with: A device with this name already exists. #3613

Closed
opened 2025-12-29 18:30:10 +01:00 by adam · 2 comments
Owner

Originally created by @pruiz on GitHub (Apr 27, 2020).

Environment

  • Python version: 3.7.7
  • NetBox version: v2.7.10 (86e1d0493685) - using official docker-compose

Steps to Reproduce

  1. Disable any installed plugins by commenting out the PLUGINS setting in configuration.py.
  2. Create a Site named SiteA
  3. Create a Site named SiteB
  4. Create a DeviceType 'dummy-device'
  5. Create a device DummyA at SiteA (of dummy-device type)
  6. Create a device DummyB at SiteB (of dummy-device type)

At this point, you will get an 'A device with this name already exists.' while trying to save/create DummyB.

Expected Behavior

From what I understand from discussion at #2669, devices with the same name are to be allowed under two conditions:

  • Both devices are at the same site, but within different tenant (ie tenant1 vs tenent2 or tenant1 vs null, etc.)
  • Both devices are not located at the same site.

So, I should be able to create two DummyDevices one at SiteA and one at SiteB w/o issues.

Observed Behavior

Creation of DummyB failed with: 'A device with this name already exists.'

Originally created by @pruiz on GitHub (Apr 27, 2020). ## Environment * Python version: 3.7.7 * NetBox version: v2.7.10 (86e1d0493685) - using official docker-compose ### Steps to Reproduce 1. Disable any installed plugins by commenting out the `PLUGINS` setting in `configuration.py`. 2. Create a Site named SiteA 3. Create a Site named SiteB 4. Create a DeviceType 'dummy-device' 5. Create a device DummyA at SiteA (of dummy-device type) 6. Create a device DummyB at SiteB (of dummy-device type) At this point, you will get an 'A device with this name already exists.' while trying to save/create DummyB. <!-- What did you expect to happen? --> ### Expected Behavior From what I understand from discussion at #2669, devices with the same name are to be allowed under two conditions: * Both devices are at the same site, but within different tenant (ie tenant1 vs tenent2 or tenant1 vs null, etc.) * Both devices are _not_ located at the same site. So, I should be able to create two DummyDevices one at SiteA and one at SiteB w/o issues. <!-- What happened instead? --> ### Observed Behavior Creation of DummyB failed with: 'A device with this name already exists.'
adam added the status: revisions needed label 2025-12-29 18:30:10 +01:00
adam closed this issue 2025-12-29 18:30:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 27, 2020):

Please try reproducing this with a recent v2.8 release.

@jeremystretch commented on GitHub (Apr 27, 2020): Please try reproducing this with a recent v2.8 release.
Author
Owner

@pruiz commented on GitHub (Apr 27, 2020):

Hi, I tried against v2.8.1 and it now works as expected. Thnks

@pruiz commented on GitHub (Apr 27, 2020): Hi, I tried against v2.8.1 and it now works as expected. Thnks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3613