Bug 1809640

Summary: Engine should not explode if host reports duplicated nameservers
Product: [oVirt] ovirt-engine Reporter: Dominik Holler <dholler>
Component: Backend.CoreAssignee: Dominik Holler <dholler>
Status: CLOSED CURRENTRELEASE QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.0CC: bugs, dfodor, rduda, sasundar
Target Milestone: ovirt-4.4.0Flags: pm-rhel: ovirt-4.4+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhv-4.4.0-28 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:00:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1809569    

Description Dominik Holler 2020-03-03 15:34:24 UTC
Description of problem:
Bug 1806967 makes vdsm reporting duplicated nameservers, which confuses engine like described in bug 1809569.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Trigger bug 1806967
2. Refresh capabilities
3.

Actual results:
Engine reports exception during parsing the capabilities:
2020-03-03 16:27:21,784+01 ERROR [org.ovirt.engine.core.vdsbroker.monitoring.HostMonitoring] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-17) [40646a7e] Unable to RefreshCapabilities beforeFirstRefreshTreatment: PSQLException: ERROR: duplicate key value violates unique constraint "name_server_pkey"
  Detail: Key (dns_resolver_configuration_id, address)=(c6bd2bc2-ae09-4a8c-ad0c-d372090c4ae4, 192.168.122.1) 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

Expected results:
Engine should parse the capabilities successful.

Additional info:

Comment 2 Dominik Holler 2020-03-24 13:26:15 UTC
*** Bug 1801715 has been marked as a duplicate of this bug. ***

Comment 4 SATHEESARAN 2020-05-05 02:16:05 UTC
Verified with vdsm-4.40.13-1.el8ev.x86_64

'# vdsm-client Host getCapabilities ' returns duplicate nameservers IP,
engine could parse it and the HE deployment works good.

Comment 6 Sandro Bonazzola 2020-05-20 20:00:43 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.