Why adding a host to RHV-M is failing with error "duplicate key value violates unique constraint "name_server_pkey""

Solution Verified - Updated -

Issue

  • Adding a host to RHV-M is failing with the error below.
2018-08-15 08:19:16,251-05 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.CollectVdsNetworkDataAfterInstallationVDSCommand] (EE-ManagedThreadFactory-engine-Thread-1) [36b1820b] Failed in 'CollectVdsNetworkDataAfterInstallationVDS' method, for vds: 'host.example.com'; host: 'host.example.com': CallableStatementCallback; SQL [{call insertnameserver(?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "name_server_pkey"
  Detail: Key (dns_resolver_configuration_id, address)=(d6b43bcd-f065-43f5-a5d8-7192b23dd761, 192.168.0.40) already exists.
  Where: SQL statement "INSERT INTO
    name_server(
      address,
      position,
      dns_resolver_configuration_id)
    VALUES (
      v_address,
      v_position,
      v_dns_resolver_configuration_id)"
PL/pgSQL function insertnameserver(uuid,character varying,smallint) line 3 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "name_server_pkey"

Environment

  • Red Hat Virtualization 4.2.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.