Error when trying to add a L2VPN with an existing identifier #6843

Closed
opened 2025-12-29 19:45:58 +01:00 by adam · 2 comments
Owner

Originally created by @v0tti on GitHub (Aug 19, 2022).

NetBox version

v3.3.0

Python version

3.9

Steps to Reproduce

  1. Create a L2VPN with name Test and identifier 1234
  2. Create a L2VPN with name Test2 and identifier 1234

Expected Behavior

I expect a warning like L2VPN with this Identifier already exists. while trying to save the second L2VPN. This is what happens when trying to create two L2VPN with the same name.

Observed Behavior

An error is raised:

<class 'django.db.utils.IntegrityError'>

duplicate key value violates unique constraint "ipam_l2vpn_identifier_key"
DETAIL:  Key (identifier)=(1234) already exists.


Python version: 3.9.7
NetBox version: 3.3.0
Originally created by @v0tti on GitHub (Aug 19, 2022). ### NetBox version v3.3.0 ### Python version 3.9 ### Steps to Reproduce 1. Create a L2VPN with name `Test` and identifier `1234` 2. Create a L2VPN with name `Test2` and identifier `1234` ### Expected Behavior I expect a warning like `L2VPN with this Identifier already exists.` while trying to save the second L2VPN. This is what happens when trying to create two L2VPN with the same name. ### Observed Behavior An error is raised: ``` <class 'django.db.utils.IntegrityError'> duplicate key value violates unique constraint "ipam_l2vpn_identifier_key" DETAIL: Key (identifier)=(1234) already exists. Python version: 3.9.7 NetBox version: 3.3.0 ```
adam added the type: bug label 2025-12-29 19:45:58 +01:00
adam closed this issue 2025-12-29 19:45:58 +01:00
Author
Owner

@v0tti commented on GitHub (Aug 19, 2022):

Just found this issue #10032 that states that the identifier should not be unique at all. In that case the expected behavior is to just be able to create the L2VPN without an error.

@v0tti commented on GitHub (Aug 19, 2022): Just found this issue #10032 that states that the identifier should not be unique at all. In that case the expected behavior is to just be able to create the L2VPN without an error.
Author
Owner

@v0tti commented on GitHub (Aug 19, 2022):

This seems to be because I upgraded from beta1. Works fine with a fresh database.

@v0tti commented on GitHub (Aug 19, 2022): This seems to be because I upgraded from beta1. Works fine with a fresh database.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6843