ERROR: duplicate key value violates unique constraint "uq_lnet_scope_name" occurs when renaming an organization VDC network in VMware Cloud Director
search cancel

ERROR: duplicate key value violates unique constraint "uq_lnet_scope_name" occurs when renaming an organization VDC network in VMware Cloud Director

book

Article ID: 397428

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When attempting to rename an organization VDC network in VMware Cloud Director, the task fails with an error similar to the following:

    Internal Server Error - could not execute update query - ERROR: duplicate key value violates unique constraint "uq_lnet_scope_name" Detail: Key (scope_type, scope_id, name)=(3, ########-####-####-####-############, <network name>) already exists.

Environment

VMware Cloud Director 10.5.x

Cause

This can occur if there are multiple duplicate direct vApp networks connected to the same org VDC network in the same vApp.

Resolution

The following steps can be used to address the issue:

  1. Review the vApps associated with orgVDC network to determine the item that possesses the duplicate vApp networks.
  2. Power off the vApp.
  3. Determine which of the direct vApp networks you wish to retain.
  4. Point all of the VM nics to this network.
  5. Remove the duplicate networks.
  6. Power on the vApp and confirm functionality.
  7. Rename the org VDC network.