Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import IPs does not set both Primary IPv4 and Primary IPv6 #861

Closed
candlerb opened this issue Jan 31, 2017 · 1 comment
Closed

Import IPs does not set both Primary IPv4 and Primary IPv6 #861

candlerb opened this issue Jan 31, 2017 · 1 comment
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@candlerb
Copy link
Contributor

(Netbox 1.8.3). To reproduce:

  • Create a device called "testimport"

  • Create an interface on this device called "default"

  • Go to "Import IPs" and paste the following CSV

    192.0.2.1/32,,,Active,testimport,default,True,
    2001:db8::1/128,,,Active,testimport,default,True,
    
  • Browse to the device "testimport"

image

image

Results: only one of the IP addresses (the IPv6 one) has been recorded as Primary.

However if I do two separate imports, each with one line of the CSV, then both addresses are recorded as primary.

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Jan 31, 2017
@jeremystretch
Copy link
Member

This seems to happen because both IP addresses are initialized with the same copy of the device model. One saves it with a primary IPv4 and no primary IPv6, and the other saves it with a primary IPv4 and no primary IPv6. Whichever comes last in the list will be the final iteration. This can be fixed by updating the Device directly in the database for each IP.

lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
…nment from alternate family during bulk import of IP addresses
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants