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

Unable to bulk add DHCP ranges v1.9.6 #1103

Closed
jpatmore opened this issue Apr 25, 2017 · 5 comments
Closed

Unable to bulk add DHCP ranges v1.9.6 #1103

jpatmore opened this issue Apr 25, 2017 · 5 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@jpatmore
Copy link

jpatmore commented Apr 25, 2017

Issue type:

**Python version:2.7.12
**NetBox version:1.9.6 (running from Docker Installation : b262543ee421 (v1.9.6))

When trying to add an IP range in to a prefix, setting status to 'DHCP' i'm getting an exception error;

bulk ip add error

Adding them as individual addresses works fine - only get an error with a range e.g 10.189.47.[72-109]/24

#Edit : this doesnt just seem to affect type DHCP, I no longer seem to be able to add ranges of any type

@zevlag
Copy link
Contributor

zevlag commented Apr 26, 2017

Also affecting v2.0.0-dev

@jeremystretch
Copy link
Member

This is happening because you're attempting to create duplicate IP addresses. We just need to fix handling of the validation error.

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Apr 26, 2017
@jpatmore
Copy link
Author

jpatmore commented Apr 26, 2017 via email

@jeremystretch
Copy link
Member

You can add a range of new IP addresses without issue. The error arises when one or more IP addresses that you try to add are duplicates of existing IPs (and uniqueness is enforced). The bulk creation fails because of the duplicate IPs, but the validation failure wasn't being handled properly.

For example, you can create the range 192.0.2.[1-3]/24. But if you then try to create 192.0.2.[3-5]/24, it will fail, because 192.0.2.3 already exists.

@jpatmore
Copy link
Author

right, but I'm not trying to create a range that includes an IP that already exists? In my example, I'm trying to add the range 10.189.47.[72-109]/24, but as per the screenshot below, these addresses have not yet been allocated?

unique ip range validation

..but I get the validation error. This happens regardless of which subnet I try to do the bulk update to, and whether any IPs have been allocated in there already. I'm thinking this must be an error in how I have set up/allocated the ranges, as no-one else seems to be reporting having this issue...

lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 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

3 participants