Rack import fails when rack group is not globally unique #4196

Closed
opened 2025-12-29 18:33:48 +01:00 by adam · 1 comment
Owner

Originally created by @martink2 on GitHub (Oct 17, 2020).

Environment

  • Python version: 3.6.9
  • NetBox version: 2.9.3

Steps to Reproduce

  1. In site A create rackgroup RG1
  2. In site B create rackgroup RG1
  3. Use the import function to import a rack into site A rackgroup RG1
site,parent,name,slug,description
A,RG1,R1,r1,

One can create the rack with the same information in the ui which works,
also an export of the manually imported rack will give the above CSV which
cannot be imported.

Expected Behavior

The rack is imported correctly.

Observed Behavior

Following error is displayed:

Row 1 parent: "Cage 1 (DH01)" is not a unique value for this field; multiple objects were found
Row 1 __all__: Rack group with this Site and Name already exists.
Originally created by @martink2 on GitHub (Oct 17, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. 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/g/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, and that any plugins have been disabled. --> ### Environment * Python version: 3.6.9 * NetBox version: 2.9.3 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. In site A create rackgroup RG1 2. In site B create rackgroup RG1 3. Use the import function to import a rack into site A rackgroup RG1 ``` site,parent,name,slug,description A,RG1,R1,r1, ``` One can create the rack with the same information in the ui which works, also an export of the manually imported rack will give the above CSV which cannot be imported. <!-- What did you expect to happen? --> ### Expected Behavior The rack is imported correctly. <!-- What happened instead? --> ### Observed Behavior Following error is displayed: ``` Row 1 parent: "Cage 1 (DH01)" is not a unique value for this field; multiple objects were found Row 1 __all__: Rack group with this Site and Name already exists. ```
adam closed this issue 2025-12-29 18:33:48 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 30, 2020):

site,parent,name,slug,description
A,RG1,R1,r1,

This is not valid data for the rack CSV import form. Rack import works as expected on v2.9.7 using the following:

site,group,name,width,u_height
A,RG1,R1,19,42
B,RG1,R1,19,42

Please post to the mailing list if you need any further assistance.

@jeremystretch commented on GitHub (Oct 30, 2020): ``` site,parent,name,slug,description A,RG1,R1,r1, ``` This is not valid data for the rack CSV import form. Rack import works as expected on v2.9.7 using the following: ``` site,group,name,width,u_height A,RG1,R1,19,42 B,RG1,R1,19,42 ``` Please post to the [mailing list](https://groups.google.com/g/netbox-discuss) if you need any further assistance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4196