Bulk Import behavior #10957

Closed
opened 2025-12-29 21:38:23 +01:00 by adam · 13 comments
Owner

Originally created by @sepetuks on GitHub (Mar 27, 2025).

Deployment Type

Self-hosted

NetBox Version

v.4.2.6

Python Version

3.12

Steps to Reproduce

  1. Select IPAM-> prefixes and bulk import
  2. put your bulk import data.
  3. In the middle of data make a mistake that the import would fail (lets say define wrong VRF)

The same applies to some other objects where name/item uniqueness is not being checked (VRFs, Chassis and etc.)
Issue was noticed to happen when we upgraded to 4.2.1 (on some earlier version 4.1.7 it was behaving ok), and still persists in 4.2.6

Expected Behavior

None of the data should imported if there are any errors on data.

Observed Behavior

Data up to the the failing line was imported.
Error where the failure occurred is shown for some time and then disappears.
It is not clear which part of data import was successful (especially if you miss that error popup).
If you try to load data again you get duplicate records (in this case prefixes) again till the failing line.

Originally created by @sepetuks on GitHub (Mar 27, 2025). ### Deployment Type Self-hosted ### NetBox Version v.4.2.6 ### Python Version 3.12 ### Steps to Reproduce 1. Select IPAM-> prefixes and bulk import 2. put your bulk import data. 3. In the middle of data make a mistake that the import would fail (lets say define wrong VRF) The same applies to some other objects where name/item uniqueness is not being checked (VRFs, Chassis and etc.) Issue was noticed to happen when we upgraded to 4.2.1 (on some earlier version 4.1.7 it was behaving ok), and still persists in 4.2.6 ### Expected Behavior None of the data should imported if there are any errors on data. ### Observed Behavior Data up to the the failing line was imported. Error where the failure occurred is shown for some time and then disappears. It is not clear which part of data import was successful (especially if you miss that error popup). If you try to load data again you get duplicate records (in this case prefixes) again till the failing line.
adam added the type: bugpending closure labels 2025-12-29 21:38:23 +01:00
adam closed this issue 2025-12-29 21:38:23 +01:00
Author
Owner

@arthanson commented on GitHub (Mar 28, 2025):

@sepetuks Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v4.3.6. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.

I tried the following with the second line being incorrect and I received the correct error and nothing was imported. Can you please provide the reproduction steps and very short sample CSV that can replicate the issue.

prefix,status,vrf
11.100.0.0/15,active,Alpha
12.100.0.0/15,active,XEEEE

Image

@arthanson commented on GitHub (Mar 28, 2025): @sepetuks Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v4.3.6. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data. I tried the following with the second line being incorrect and I received the correct error and nothing was imported. Can you please provide the reproduction steps and very short sample CSV that can replicate the issue. ``` prefix,status,vrf 11.100.0.0/15,active,Alpha 12.100.0.0/15,active,XEEEE ``` ![Image](https://github.com/user-attachments/assets/e82731d5-db0a-405c-9f05-1696e6313e69)
Author
Owner

@TadasNRK commented on GitHub (Mar 31, 2025):

Hello all,

I'm able to reproduce this issue in NetBox Community v4.2.6 by adding "vlan_group" to an import data.

prefix status vrf vlan_group
192.168.100.0/22 active abc mygroup1
10.113.128.128/29 active dbc mygroup1
10.116.0.129/29 active efg mygroup1
10.1.29.0/24 active ghj mygroup1

In the third line I did add wrong prefix to have an error. After doing bulk import the first 2 prefixes were created.

Regards,
Tadas

@TadasNRK commented on GitHub (Mar 31, 2025): Hello all, I'm able to reproduce this issue in NetBox Community v4.2.6 by adding "vlan_group" to an import data. prefix status vrf vlan_group 192.168.100.0/22 active abc mygroup1 10.113.128.128/29 active dbc mygroup1 10.116.0.129/29 active efg mygroup1 10.1.29.0/24 active ghj mygroup1 In the third line I did add wrong prefix to have an error. After doing bulk import the first 2 prefixes were created. Regards, Tadas
Author
Owner

@sepetuks commented on GitHub (Apr 6, 2025):

I want to know that this behavior (importing part of data till first error) is happening in other places as well (I also observed that in devices import). Of course device import checks device name existance and second try to import gives error that some part of devices from import already exists. In any case that is very complicated to track which part of data was imported.

@sepetuks commented on GitHub (Apr 6, 2025): I want to know that this behavior (importing part of data till first error) is happening in other places as well (I also observed that in devices import). Of course device import checks device name existance and second try to import gives error that some part of devices from import already exists. In any case that is very complicated to track which part of data was imported.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 14, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Apr 14, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@sepetuks commented on GitHub (Apr 14, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

Can someone tell why there is such notification? The additional informations was provided.

@sepetuks commented on GitHub (Apr 14, 2025): > This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically. Can someone tell why there is such notification? The additional informations was provided.
Author
Owner

@jeremystretch commented on GitHub (Apr 22, 2025):

@sepetuks you were asked to provide the following:

Can you please provide the reproduction steps and very short sample CSV that can replicate the issue.

@jeremystretch commented on GitHub (Apr 22, 2025): @sepetuks you were asked to provide the following: > Can you please provide the reproduction steps and very short sample CSV that can replicate the issue.
Author
Owner

@sepetuks commented on GitHub (Apr 22, 2025):

Hi This was provided by my colleague TadasNRK with data load

@sepetuks you were asked to provide the following:

Can you please provide the reproduction steps and very short sample CSV that can replicate the issue.

@sepetuks commented on GitHub (Apr 22, 2025): Hi This was provided by my colleague [TadasNRK](https://github.com/TadasNRK) with [data load](https://github.com/netbox-community/netbox/issues/19026#issuecomment-2766003145) > [@sepetuks](https://github.com/sepetuks) you were asked to provide the following: > > > Can you please provide the reproduction steps and very short sample CSV that can replicate the issue.
Author
Owner

@jeremystretch commented on GitHub (Apr 22, 2025):

That isn't CSV data, nor would it be sufficient to reproduce the reported behavior. As Arthur requested above, you'll need to identify a series of specific steps that someone else can follow to reproduce the problem.

@jeremystretch commented on GitHub (Apr 22, 2025): That isn't CSV data, nor would it be sufficient to reproduce the reported behavior. As Arthur requested above, you'll need to identify a series of specific steps that someone else can follow to reproduce the problem.
Author
Owner

@sepetuks commented on GitHub (Apr 22, 2025):

Hi,
Data in your requested format:
prefix;status;vrf;vlan_group
192.168.100.0/22;active;abc;mygroup1
10.113.128.128/29;active;dbc;mygroup1
10.116.0.129/29;active;efg;mygroup1
10.1.29.0/24;active;ghj;mygroup1

But as I wrote this is only one of examples. Issue persists in other places as well.

@sepetuks commented on GitHub (Apr 22, 2025): Hi, Data in your requested format: prefix;status;vrf;vlan_group 192.168.100.0/22;active;abc;mygroup1 10.113.128.128/29;active;dbc;mygroup1 10.116.0.129/29;active;efg;mygroup1 10.1.29.0/24;active;ghj;mygroup1 But as I wrote this is only one of examples. Issue persists in other places as well.
Author
Owner

@jeremystretch commented on GitHub (Apr 22, 2025):

Again, this is not sufficient to reproduce the behavior, as @arthanson points out above. I also am not able to reproduce it.

@jeremystretch commented on GitHub (Apr 22, 2025): Again, this is not sufficient to reproduce the behavior, as @arthanson points out above. I also am not able to reproduce it.
Author
Owner

@sepetuks commented on GitHub (Apr 24, 2025):

Again, this is not sufficient to reproduce the behavior, as @arthanson points out above. I also am not able to reproduce it.

I think we have some miscommunication here as we feel that we didn't get response how did it go with modified import data set.

So lets start from beginning.

Data set for import

prefix;status;vrf;vlan_group
192.168.100.0/22;active;abc;mygroup1
10.113.128.128/29;active;dbc;mygroup1
10.116.0.129/29;active;efg;mygroup1
10.1.29.0/24;active;ghj;mygroup1

Before you try this import:

  • make sure you have VLAN group "mygroup1" existing.
  • make sure you have all VRFs existing.
  • Make sure all prefixes do NOT exist.

When I try to do import in such conditions, I get following error:

Record 3 prefix: 10.116.0.129/29 is not a valid prefix. Did you mean 10.116.0.128/29?
But problem is that import for record 1 and 2 was still performed.

@sepetuks commented on GitHub (Apr 24, 2025): > Again, this is not sufficient to reproduce the behavior, as [@arthanson](https://github.com/arthanson) points out above. I also am not able to reproduce it. I think we have some miscommunication here as we feel that we didn't get response how did it go with modified import data set. So lets start from beginning. **Data set for import** prefix;status;vrf;vlan_group 192.168.100.0/22;active;abc;mygroup1 10.113.128.128/29;active;dbc;mygroup1 10.116.0.129/29;active;efg;mygroup1 10.1.29.0/24;active;ghj;mygroup1 **Before you try this import:** - make sure you have VLAN group "mygroup1" existing. - make sure you have all VRFs existing. - Make sure all prefixes do **NOT** exist. **When I try to do import in such conditions, I get following error:** ```Record 3 prefix: 10.116.0.129/29 is not a valid prefix. Did you mean 10.116.0.128/29?``` But problem is that import for record 1 and 2 was still performed.
Author
Owner

@sepetuks commented on GitHub (May 22, 2025):

based on additional feedback I got from my team it appears issue is only seen like that when you sue upload to branch.

@sepetuks commented on GitHub (May 22, 2025): based on additional feedback I got from my team it appears issue is only seen like that when you sue upload to branch.
Author
Owner

@arthanson commented on GitHub (May 28, 2025):

@sepetuks I am able to reproduce this but only with branching enabled. I'll close this issue, can you please re-open it in net box-branching. please include your updated reproduction steps there.

@arthanson commented on GitHub (May 28, 2025): @sepetuks I am able to reproduce this but only with branching enabled. I'll close this issue, can you please re-open it in net box-branching. please include your updated reproduction steps there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10957