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

Exception raised when importing prefix against duplicate vlan_vid #1275

Closed
candlerb opened this issue Jun 15, 2017 · 0 comments
Closed

Exception raised when importing prefix against duplicate vlan_vid #1275

candlerb opened this issue Jun 15, 2017 · 0 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@candlerb
Copy link
Contributor

Issue type: bug report

Python version: 3.5.2
NetBox version: 2.0.6

To reproduce:

Import two VLANs with same vid:

vid,name,status
301,test1,Reserved
301,test2,Reserved

Import a prefix which references this vid

prefix,status,vlan_vid
192.0.2.0/24,Active,301

This causes a Server Error:

<class 'ipam.models.MultipleObjectsReturned'>

get() returned more than one VLAN -- it returned 2!

I think in this case Netbox is correct - it should either reject the upload, or import the prefix with a NULL vlan association and generate a warning. But it would be better to report this properly rather than throw an exception (which mails a backtrace to the administrator)

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Jun 15, 2017
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

2 participants